diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3715de7e0..9fac19f60 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -214,6 +214,11 @@ jobs: - name: ${{ matrix.test }} (${{ matrix.track }}) run: | set -eux + + # XXX: prevent accidental usage of `images:` in CI test jobs. + # All tests should be done using officially supported images. + echo '127.0.0.1 images.lxd.canonical.com' | sudo tee /etc/hosts + TEST_SCRIPT="$(echo ${{ matrix.test }} | cut -d " " -f 1)" EXTRA_ARGS="$(echo ${{ matrix.test }} | cut -d " " -f 2- --only-delimited)" if [ "${TEST_SCRIPT}" = "cluster" ]; then diff --git a/bin/test-image b/bin/test-image index c94eab366..f6e5fbddd 100755 --- a/bin/test-image +++ b/bin/test-image @@ -270,8 +270,8 @@ done # Check that cloud variants can be rebooted cleanly. if [ "${VARIANT}" = "cloud" ]; then + echo "==> Performing post cloud-init reboot test" for name in ${INSTANCES}; do - echo "==> Performing post cloud-init reboot test" lxc exec "${name}" -- cloud-init status --wait --long # If systemd is available, use it to wait for any other job to complete before the restart