diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0d921609c..5319619bf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -109,7 +109,8 @@ jobs: # disable dpkg from calling sync() echo "force-unsafe-io" | sudo tee /etc/dpkg/dpkg.cfg.d/force-unsafe-io - - name: Reclaim some space + - name: Reclaim some space (storage tests only) + if: ${{ startsWith(matrix.test, 'storage') }} run: | set -eux df -h diff --git a/bin/helpers b/bin/helpers index f058bd531..28cb75267 100644 --- a/bin/helpers +++ b/bin/helpers @@ -167,6 +167,12 @@ createPowerFlexPool() ( # cleanup: report if the test passed or not and return the appropriate return code. cleanup() { + # Run any extra cleanup function + if command -v extra_cleanup > /dev/null; then + trap + extra_cleanup + fi + set +e echo "" if [ "${FAIL}" = "1" ]; then @@ -188,11 +194,6 @@ cleanup() { exit 1 fi - # Run any extra cleanup function only on success - if command -v extra_cleanup > /dev/null; then - extra_cleanup || true - fi - echo "Test passed" exit 0 } diff --git a/tests/cluster b/tests/cluster index 9cf07d84b..ee0d2fc0b 100755 --- a/tests/cluster +++ b/tests/cluster @@ -68,7 +68,7 @@ for i in $(seq "${SIZE}"); do MEMBER_IP=$(lxc exec "${PREFIX}-$i" -- ip -4 addr show dev eth0 scope global | grep inet | cut -d' ' -f6 | cut -d/ -f1) # Get a join token - TOKEN="$(lxc exec "${PREFIX}-1" -- lxc cluster add "${PREFIX}-${i}" | tail -n1)" + TOKEN="$(lxc exec "${PREFIX}-1" -- lxc cluster add --quiet "${PREFIX}-${i}")" lxc exec "${PREFIX}-$i" -- lxd init --preseed << EOF cluster: