make the vm test's priv request wait for the salvage reply
This commit is contained in:
parent
b4ce4e0d90
commit
2b4fd52b0a
1 changed files with 8 additions and 2 deletions
|
|
@ -140,8 +140,14 @@ pkgs.testers.runNixOSTest {
|
||||||
"binds": BINDS,
|
"binds": BINDS,
|
||||||
"isolation": {"bridge": "${bridge}", "gateway_ip": "${gateway}"},
|
"isolation": {"bridge": "${bridge}", "gateway_ip": "${gateway}"},
|
||||||
})
|
})
|
||||||
out = host.succeed(f"echo '{req}' | socat - UNIX-CONNECT:/run/hive/priv.sock")
|
# socat gives up 0.5s after its stdin ends unless told to wait; the
|
||||||
assert json.loads(out.strip().splitlines()[-1])["ok"] is True, out
|
# salvage copies a whole root, which takes longer.
|
||||||
|
out = host.succeed(f"echo '{req}' | socat -t 120 - UNIX-CONNECT:/run/hive/priv.sock")
|
||||||
|
print("hive-priv answered: " + repr(out))
|
||||||
|
print(host.execute("journalctl -u hive-priv --no-pager | tail -n 30")[1])
|
||||||
|
lines = out.strip().splitlines()
|
||||||
|
assert lines, "hive-priv sent no response"
|
||||||
|
assert json.loads(lines[-1])["ok"] is True, out
|
||||||
|
|
||||||
def conf():
|
def conf():
|
||||||
return host.succeed(f"cat /etc/nixos-containers/{MACHINE}.conf")
|
return host.succeed(f"cat /etc/nixos-containers/{MACHINE}.conf")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue