Skip to content

Commit

Permalink
tests/devlxd-container: Wait indefinitely for snap seed.
Browse files Browse the repository at this point in the history
This follows the pattern used in the `cluster` tests of calling
`waitInstanceBooted` and then waiting for the snap seed indefinitely.

Signed-off-by: Mark Laing <[email protected]>
  • Loading branch information
markylaing committed Aug 5, 2024
1 parent 0a64cb2 commit 645c384
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/devlxd-container
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ if hasNeededAPIExtension instance_ready_state; then
[ "$(lxc config get c1 volatile.last_state.ready)" = "false" ]

lxc start c1
waitInstanceBooted c1
else
echo "Skipping instance Ready state tests, not supported"
fi
Expand All @@ -99,7 +100,7 @@ fi

# We need snapd to be ready before the next tests. Finagle the waitSnapdSeed function definition into the container and run it.
# shellcheck disable=SC3044 # Ignore "declare is undefined" shellcheck error.
lxc exec c1 -- sh -c "$(declare -f waitSnapdSeed); waitSnapdSeed"
lxc exec c1 -- snap wait system seed.loaded
lxc exec c1 -- snap remove --purge lxd || true
lxc exec c1 -- snap install lxd --channel="${LXD_SNAP_CHANNEL}"
lxc exec c1 -- /snap/bin/lxd init --auto
Expand Down

0 comments on commit 645c384

Please sign in to comment.