test: representative expected_na scenario (functional covered, backup declared-N/A)
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
3b0a3d14ea
commit
f3a1ad5388
@@ -322,6 +322,8 @@ def test_cap_intent_blank_when_not_capped_on_na():
|
|||||||
|
|
||||||
|
|
||||||
def test_build_results_threads_expected_na(tmp_path):
|
def test_build_results_threads_expected_na(tmp_path):
|
||||||
|
# Mirrors custom-html-tiny post-change: install + a passing functional (custom) test, but no
|
||||||
|
# backup surface (backup_restore declared intentionally N/A).
|
||||||
recs = [
|
recs = [
|
||||||
{
|
{
|
||||||
"tier": "install",
|
"tier": "install",
|
||||||
@@ -329,7 +331,14 @@ def test_build_results_threads_expected_na(tmp_path):
|
|||||||
"file": "g/test_install.py",
|
"file": "g/test_install.py",
|
||||||
"rc": 0,
|
"rc": 0,
|
||||||
"junit": _write(tmp_path, "i.xml", JUNIT_PASS),
|
"junit": _write(tmp_path, "i.xml", JUNIT_PASS),
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"tier": "custom",
|
||||||
|
"source": "cc-ci",
|
||||||
|
"file": "c/test_serves_content.py",
|
||||||
|
"rc": 0,
|
||||||
|
"junit": _write(tmp_path, "c.xml", JUNIT_PASS),
|
||||||
|
},
|
||||||
]
|
]
|
||||||
data = R.build_results(
|
data = R.build_results(
|
||||||
recipe="custom-html-tiny",
|
recipe="custom-html-tiny",
|
||||||
@@ -337,7 +346,7 @@ def test_build_results_threads_expected_na(tmp_path):
|
|||||||
pr="0",
|
pr="0",
|
||||||
ref=None,
|
ref=None,
|
||||||
records=recs,
|
records=recs,
|
||||||
results=_results(backup="skip", restore="skip", custom="skip"),
|
results=_results(backup="skip", restore="skip"), # custom=pass (default) → functional pass
|
||||||
backup_capable=False, # no backupbot label → backup_restore N/A
|
backup_capable=False, # no backupbot label → backup_restore N/A
|
||||||
declared=[],
|
declared=[],
|
||||||
deps_ready=True,
|
deps_ready=True,
|
||||||
@@ -347,12 +356,14 @@ def test_build_results_threads_expected_na(tmp_path):
|
|||||||
finished_ts=0.0,
|
finished_ts=0.0,
|
||||||
expected_na={"backup_restore": "stateless static file server"},
|
expected_na={"backup_restore": "stateless static file server"},
|
||||||
)
|
)
|
||||||
# N/A still caps at L2 (never inflates), but now annotated intentional rather than flagged.
|
# backup_restore N/A still caps at L2 (never inflates) — even though functional passes above it,
|
||||||
|
# the gap caps the climb — but the cap is now annotated intentional rather than flagged.
|
||||||
assert data["level"] == 2
|
assert data["level"] == 2
|
||||||
assert "L3" in data["level_cap_reason"]
|
assert "L3" in data["level_cap_reason"]
|
||||||
assert data["level_cap_intent"] == "intentional · stateless static file server"
|
assert data["level_cap_intent"] == "intentional · stateless static file server"
|
||||||
assert data["na"]["rungs"]["backup_restore"]["intent"] == "declared"
|
assert data["na"]["rungs"]["backup_restore"]["intent"] == "declared"
|
||||||
assert data["na"]["gaps"] == []
|
assert data["rungs"]["functional"] == "pass"
|
||||||
|
assert data["na"]["gaps"] == [] # functional now covered; backup_restore declared → no gaps
|
||||||
|
|
||||||
|
|
||||||
def test_write_results_roundtrip(tmp_path):
|
def test_write_results_roundtrip(tmp_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user