forgetest: the first-run flow checks the machine facts see the head

setup.first-run-flow, after the machine step, checks that GET /wiz's
machine facts read the head as present with a hardware id. The facts had
read every head as not detected (forgectrl looked for "hw_id=" where the
module prints "id="); the bench reference always has a head, so the check
holds on every campaign.

Proof: the setup host tests and the manifest tests pass; on the bench
reference with the fixed forgectrl, GET /wiz reads the head as present
with hw_id 044c.

Acceptance: this is the test; it covers src/wiz.* already.
This commit is contained in:
ScottW514
2026-10-12 15:32:11 -04:00
parent ed52e752ee
commit a729197a8f
+6
View File
@@ -1580,6 +1580,12 @@ def first_run_flow(ctx):
model = machine.get("model") if machine.get("model") in ("basic", "plus", "pro") else "basic"
st, body = fc.post("/wiz/machine", data={"model": model, "tec": "0"})
ctx.check(st == 200, "POST /wiz/machine -> %s %s", st, body if isinstance(body, dict) else "")
# The machine facts the step records see the head: its hardware id
# is the module's head/info "id" line.
head = (wiz(fc).get("machine") or {}).get("head") or {}
ev["head"] = head
ctx.check(head.get("present") is True and bool(head.get("hw_id")),
"the machine facts do not see the head: %s", head)
still_gated(REQUIRED_STEPS[2:])
if settings.get("cloud_enabled") == "1":
data = {"enabled": "1", "phrase": SAFETY_PHRASE,