Skip to content

Commit

Permalink
Use a valid JWT in wlcg bearer token tests
Browse files Browse the repository at this point in the history
Test ocassionally fail due to google auth library reporting
google.auth.exceptions.MalformedError. The test token we were using
really didn't look like a jwt. Picked up a random test JWT to
pass into the library call during tests.
  • Loading branch information
BenGalewsky committed Dec 17, 2024
1 parent 2c958ad commit 9912fc9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_servicex_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ async def test_get_transforms_wlcg_bearer_token(decode,
servicex,
transform_status_response):
token_file = tempfile.NamedTemporaryFile(mode="w+t", delete=False)
token_file.write("luckycharms")
token_file.write(""""
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
""")
token_file.close()

os.environ['BEARER_TOKEN_FILE'] = token_file.name
Expand Down

0 comments on commit 9912fc9

Please sign in to comment.