Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
holmanb committed Sep 12, 2024
1 parent bbdf5ef commit cfd3763
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions tests/integration_tests/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,22 @@ def _verify_clean_boot(
f"{out.stdout}\nstderr:\n{out.stderr}"
)
else:
# we know that we should have a return code of 2
# we know that we should have a return code of 2 on noble and later
out = instance.execute("cloud-init status --long")
rc = 2
if CURRENT_RELEASE < NOBLE:
rc = 0
assert rc == out.return_code, (
f"Unexpected return code from `cloud-init status`. "
f"Expected rc=2, received rc={out.return_code}\nstdout: "
f"{out.stdout}\nstderr: {out.stderr}"
)
assert 0 == out.return_code, (
f"Unexpected return code from `cloud-init status` on "
f"{CURRENT_RELEASE}. Expected rc={rc}, received "
f"rc={out.return_code}\nstdout: {out.stdout}\nstderr: "
f"{out.stderr}"
)
else:
assert 2 == out.return_code, (
f"Unexpected return code from `cloud-init status`. "
f"Expected rc={rc}, received rc={out.return_code}\nstdout: "
f"{out.stdout}\nstderr: {out.stderr}"
)
schema = instance.execute("cloud-init schema --system --annotate")
assert schema.ok, (
f"Schema validation failed\nstdout:{schema.stdout}"
Expand Down

0 comments on commit cfd3763

Please sign in to comment.