Skip to content

Commit 916c2c5

Browse files
ramonpetgrave64jku
andauthored
Fix timestamp tests (#1406)
* fix tsa tests Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com> * newline Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com> --------- Signed-off-by: Ramon Petgrave <ramon.petgrave64@gmail.com> Co-authored-by: Jussi Kukkonen <jkukkonen@google.com>
1 parent 6ae464b commit 916c2c5

File tree

3 files changed

+35
-7
lines changed

3 files changed

+35
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ jobs:
7878
7979
# Ensure Timestamp Authority tests are not skipped by
8080
# having pytest show skipped tests and verifying ours are running
81+
set -o pipefail
8182
make test TEST_ARGS="-m timestamp_authority -rs" | tee output
8283
! grep -q "skipping test that requires a Timestamp Authority" output || (echo "ERROR: Found skip message" && exit 1)
8384
env:

test/assets/tsa/trust_config.json

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,39 @@
113113
]
114114
},
115115
"signing_config": {
116-
"ca_url": "https://fulcio.sigstage.dev",
117-
"tlog_urls": [
118-
"https://rekor.sigstage.dev"
116+
"mediaType": "application/vnd.dev.sigstore.signingconfig.v0.2+json",
117+
"caUrls": [
118+
{
119+
"url": "https://fulcio.sigstage.dev",
120+
"majorApiVersion": 1,
121+
"validFor": {
122+
"start": "2022-04-14T21:38:40.000Z"
123+
}
124+
}
119125
],
120-
"tsa_urls": [
121-
"placeholder-value"
122-
]
126+
"rekorTlogUrls": [
127+
{
128+
"url": "https://rekor.sigstage.dev",
129+
"majorApiVersion": 1,
130+
"validFor": {
131+
"start": "2021-01-12T11:53:27.000Z"
132+
}
133+
}
134+
],
135+
"tsaUrls": [
136+
{
137+
"url": "placeholder",
138+
"majorApiVersion": 1,
139+
"validFor": {
140+
"start": "2024-11-07T14:59:40.000Z"
141+
}
142+
}
143+
],
144+
"rekorTlogConfig": {
145+
"selector": "ANY"
146+
},
147+
"tsaConfig": {
148+
"selector": "ANY"
149+
}
123150
}
124151
}

test/unit/test_sign.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def sig_ctx(self, asset, tsa_url) -> SigningContext:
174174
asset("tsa/trust_config.json").read_text()
175175
)
176176

177-
trust_config._inner.signing_config.tsa_urls[0] = tsa_url
177+
trust_config._inner.signing_config.tsa_urls[0].url = tsa_url
178178

179179
return SigningContext.from_trust_config(trust_config)
180180

0 commit comments

Comments
 (0)