Skip to content

Commit 980a984

Browse files
authored
fix: run/service-auth - ensure token decoded before use (GoogleCloudPlatform#11124)
* fix: ensure token decoded before use * fix: debug moving decodes earlier
1 parent 6a45daf commit 980a984

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

run/service-auth/receive_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ def services():
6666
],
6767
stdout=subprocess.PIPE,
6868
check=True,
69-
).stdout.strip()
69+
).stdout.strip().decode()
7070

7171
token = subprocess.run(
7272
["gcloud", "auth", "print-identity-token"], stdout=subprocess.PIPE, check=True
73-
).stdout.strip()
73+
).stdout.strip().decode()
7474

7575
yield endpoint_url, token
7676

@@ -92,8 +92,8 @@ def services():
9292

9393

9494
def test_auth(services):
95-
url = services[0].decode()
96-
token = services[1].decode()
95+
url = services[0]
96+
token = services[1]
9797

9898
req = request.Request(url)
9999
try:

0 commit comments

Comments
 (0)