From 4e18c11e4ef6f9073d8f391b06430001827a3ce2 Mon Sep 17 00:00:00 2001 From: Ramon Petgrave Date: Wed, 21 May 2025 22:19:32 +0000 Subject: [PATCH 1/2] fix tsa tests Signed-off-by: Ramon Petgrave --- .github/workflows/ci.yml | 1 + test/assets/tsa/trust_config.json | 41 +++++++++++++++++++++++++------ test/unit/test_sign.py | 2 +- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c568d03b..85e4b83f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,7 @@ jobs: # Ensure Timestamp Authority tests are not skipped by # having pytest show skipped tests and verifying ours are running + set -o pipefail make test TEST_ARGS="-m timestamp_authority -rs" | tee output ! grep -q "skipping test that requires a Timestamp Authority" output || (echo "ERROR: Found skip message" && exit 1) env: diff --git a/test/assets/tsa/trust_config.json b/test/assets/tsa/trust_config.json index 4be318b61..a5b0219f4 100644 --- a/test/assets/tsa/trust_config.json +++ b/test/assets/tsa/trust_config.json @@ -113,12 +113,39 @@ ] }, "signing_config": { - "ca_url": "https://fulcio.sigstage.dev", - "tlog_urls": [ - "https://rekor.sigstage.dev" + "mediaType": "application/vnd.dev.sigstore.signingconfig.v0.2+json", + "caUrls": [ + { + "url": "https://fulcio.sigstage.dev", + "majorApiVersion": 1, + "validFor": { + "start": "2022-04-14T21:38:40.000Z" + } + } ], - "tsa_urls": [ - "placeholder-value" - ] + "rekorTlogUrls": [ + { + "url": "https://rekor.sigstage.dev", + "majorApiVersion": 1, + "validFor": { + "start": "2021-01-12T11:53:27.000Z" + } + } + ], + "tsaUrls": [ + { + "url": "placeholder", + "majorApiVersion": 1, + "validFor": { + "start": "2024-11-07T14:59:40.000Z" + } + } + ], + "rekorTlogConfig": { + "selector": "ANY" + }, + "tsaConfig": { + "selector": "ANY" + } } -} +} \ No newline at end of file diff --git a/test/unit/test_sign.py b/test/unit/test_sign.py index 756748bc0..ab79e7394 100644 --- a/test/unit/test_sign.py +++ b/test/unit/test_sign.py @@ -183,7 +183,7 @@ def sig_ctx(self, asset, tsa_url) -> SigningContext: asset("tsa/trust_config.json").read_text() ) - trust_config._inner.signing_config.tsa_urls[0] = tsa_url + trust_config._inner.signing_config.tsa_urls[0].url = tsa_url return SigningContext._from_trust_config(trust_config) From ffae19c57767ec4f30c1c8e4dd1a844714a6d78d Mon Sep 17 00:00:00 2001 From: Ramon Petgrave Date: Wed, 21 May 2025 22:32:30 +0000 Subject: [PATCH 2/2] newline Signed-off-by: Ramon Petgrave --- test/assets/tsa/trust_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/assets/tsa/trust_config.json b/test/assets/tsa/trust_config.json index a5b0219f4..273f27395 100644 --- a/test/assets/tsa/trust_config.json +++ b/test/assets/tsa/trust_config.json @@ -148,4 +148,4 @@ "selector": "ANY" } } -} \ No newline at end of file +}