Skip to content

Commit a19fa5f

Browse files
authored
ci: ambient credential tests fix (#1416)
1 parent 33e2765 commit a19fa5f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/unit/conftest.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
_TUF_ASSETS = (Path(__file__).parent.parent / "assets" / "staging-tuf").resolve()
4848
assert _TUF_ASSETS.is_dir()
4949

50+
TEST_CLIENT_ID = "sigstore"
51+
5052

5153
@pytest.fixture
5254
def x509_testcase(asset):
@@ -209,7 +211,7 @@ def ctx_cls():
209211
token = os.getenv(f"SIGSTORE_IDENTITY_TOKEN_{env}")
210212
if not token:
211213
# If the variable is not defined, try getting an ambient token.
212-
token = detect_credential()
214+
token = detect_credential(TEST_CLIENT_ID)
213215

214216
return ctx_cls, IdentityToken(token)
215217

@@ -230,7 +232,7 @@ def signer():
230232
token = os.getenv("SIGSTORE_IDENTITY_TOKEN_staging")
231233
if not token:
232234
# If the variable is not defined, try getting an ambient token.
233-
token = detect_credential()
235+
token = detect_credential(TEST_CLIENT_ID)
234236

235237
return signer, verifier, IdentityToken(token)
236238

0 commit comments

Comments
 (0)