fix(cases): admit reviewed descriptor pin validator revision
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a140c4-354a-7823-8f0d-8f717397f786
This commit is contained in:
tegwick 2026-10-16 21:35:04 +02:00
parent d79f065955
commit d97652a3bb
4 changed files with 72 additions and 2 deletions

View file

@ -183,3 +183,25 @@ def test_required_browser_parameter_is_not_defaulted_away(rig):
with pytest.raises(Refused, match="exact-version"):
executor.admit(*sources, **kwargs)
assert not calls
@pytest.mark.parametrize("version", ["1.1", "1.2"])
@pytest.mark.parametrize(
"pins",
[
None,
[],
{"mint-secret": "sha256:" + "A" * 64},
{"mint-secret": "sha256:" + "a" * 64 + "\n"},
{"undeclared-step": "sha256:" + "a" * 64},
{"mint-secret": ["sha256:" + "a" * 64]},
{"step-" + str(n): "sha256:" + "a" * 64 for n in range(129)},
],
)
def test_actual_producer_refuses_malformed_descriptor_pins(rig, version, pins):
executor, calls, sources, _ = browser(rig, version)
case, typ = (yaml.safe_load(source) for source in sources[:2])
typ["spec"]["execution_descriptors"] = pins
with pytest.raises(Refused, match="exact-version"):
executor.browser_inputs.target(case, typ, "client_id")
assert not calls