Skip to content

Commit d7ddd50

Browse files
staging_with_rekorv2 uses embedded trust config
Signed-off-by: Ramon Petgrave <[email protected]>
1 parent 81cce07 commit d7ddd50

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/unit/conftest.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
from id import (
3232
detect_credential,
3333
)
34-
from sigstore_protobuf_specs.dev.sigstore.trustroot.v1 import Service
3534
from tuf.api.exceptions import DownloadHTTPError
3635
from tuf.ngclient import FetcherInterface, updater
3736

@@ -239,19 +238,20 @@ def signer():
239238

240239

241240
@pytest.fixture
242-
def staging_with_rekorv2() -> tuple[
243-
type[SigningContext], type[Verifier], IdentityToken
244-
]:
241+
def staging_with_rekorv2(
242+
asset,
243+
) -> tuple[type[SigningContext], type[Verifier], IdentityToken]:
245244
"""
246245
Returns a SigningContext, Verifier, and IdentityToken for the staging environment.
247246
The signingContext will use the Rekor V2 instance even if it is not yet enabled in
248247
staging signing config.
249248
"""
250249

251250
def signer():
252-
trust_config = ClientTrustConfig.staging()
253-
trust_config.signing_config._tlogs.append(
254-
Service("https://log2025-alpha1.rekor.sigstage.dev", 2)
251+
trust_config = ClientTrustConfig.from_json(
252+
asset(
253+
os.path.join("trust_config", "staging-but-sign-with-rekor-v2.json")
254+
).read_text()
255255
)
256256
return SigningContext.from_trust_config(trust_config)
257257

0 commit comments

Comments
 (0)