Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
TimWang committed Jul 18, 2024
1 parent 8410c81 commit 328884b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def test_auth_provider(self):
).decode("utf-8")
self.assertEqual(f"{user}:dummy", token_string)

original_gravitino_user = (
os.environ["GRAVITINO_USER"] if "GRAVITINO_USER" in os.environ else ""
)
os.environ["GRAVITINO_USER"] = "test_auth2"
provider: AuthDataProvider = SimpleAuthProvider()
self.assertTrue(provider.has_token_data())
Expand All @@ -50,4 +53,4 @@ def test_auth_provider(self):
token[len(AuthConstants.AUTHORIZATION_BASIC_HEADER) :]
).decode("utf-8")
self.assertEqual(f"{user}:dummy", token_string)
os.environ["GRAVITINO_USER"] = ""
os.environ["GRAVITINO_USER"] = original_gravitino_user

0 comments on commit 328884b

Please sign in to comment.