From 645c38456bef1343b9458219ff8f600bd0a3736d Mon Sep 17 00:00:00 2001 From: Mark Laing Date: Mon, 5 Aug 2024 09:34:12 +0100 Subject: [PATCH] tests/devlxd-container: Wait indefinitely for snap seed. 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 --- tests/devlxd-container | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/devlxd-container b/tests/devlxd-container index 6c2b32eba..c780c3cfa 100755 --- a/tests/devlxd-container +++ b/tests/devlxd-container @@ -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 @@ -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