Skip to content

Commit

Permalink
tests: Fix devlxd-container tests. (#275)
Browse files Browse the repository at this point in the history
The `waitInstanceBooted` function was failing because systemctl inside
the container was sometimes reporting a degraded state after the force
stop. This doesn't matter for the purpose of this test. Now we just wait
for the instance to show some processes, then ensure that snapd is
running before we call `snap wait system seed.loaded`.
  • Loading branch information
simondeziel authored Aug 23, 2024
2 parents 66a7c10 + 9a4ad31 commit b935610
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/devlxd-container
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo "==> Create storage pool using driver ${poolDriver}"
lxc storage create "${poolName}" "${poolDriver}"

echo "==> Create container and boot"
lxc launch "${TEST_IMG:-ubuntu-minimal-daily:24.04}" c1 -s "${poolName}" -c security.nesting=true
lxc launch "${TEST_IMG:-ubuntu:24.04}" c1 -s "${poolName}" -c security.nesting=true
lxc info c1

echo "==> Checking devlxd is working"
Expand Down Expand Up @@ -107,7 +107,7 @@ lxc monitor --type lifecycle --format json > monitor.json 2>&1 &
monitorPID="${!}"

# Launch an image we know is on the host.
lxc exec c1 -- /snap/bin/lxc launch "${TEST_IMG:-ubuntu-minimal-daily:24.04}" c1c1
lxc exec c1 -- /snap/bin/lxc launch "${TEST_IMG:-ubuntu:24.04}" c1c1
lxc exec c1 -- /snap/bin/lxc info c1c1 | grep -F RUNNING

kill -9 "${monitorPID}"
Expand Down

0 comments on commit b935610

Please sign in to comment.