mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-10-15 17:19:55 -07:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user