From 9e2fc74ccb02b76dbacaedae216b802e53882550 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Fri, 1 Mar 2024 10:29:57 +0100 Subject: [PATCH] ci: Fix non failing integration tests Remove { } from runme.sh files to avoid failures being masked. Re-add install of ansible.posix to have the ansible.posix.profile_task callback available. Signed-off-by: Felix Matouschek --- .github/workflows/integration.yml | 3 +++ tests/integration/targets/inventory_kubevirt/runme.sh | 5 ----- tests/integration/targets/kubevirt_vm/runme.sh | 8 ++------ tests/integration/targets/kubevirt_vm_info/runme.sh | 7 ++----- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 5635346..297600d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -88,6 +88,9 @@ jobs: ansible-galaxy collection install \ -r ${{ env.source_directory }}/requirements.yml \ -p /home/runner/collections --force-with-deps + # Install ansible.posix to have the ansible.posix.profile_task callback available + ansible-galaxy collection install ansible.posix \ + -p /home/runner/collections --force-with-deps - name: Install kubevirt.core collection id: install diff --git a/tests/integration/targets/inventory_kubevirt/runme.sh b/tests/integration/targets/inventory_kubevirt/runme.sh index 93df0e0..d4cb253 100755 --- a/tests/integration/targets/inventory_kubevirt/runme.sh +++ b/tests/integration/targets/inventory_kubevirt/runme.sh @@ -7,7 +7,6 @@ export ANSIBLE_ROLES_PATH="../" USER_CREDENTIALS_DIR=$(pwd) export USER_CREDENTIALS_DIR -{ export ANSIBLE_CALLBACKS_ENABLED=profile_tasks export ANSIBLE_INVENTORY_ENABLED=kubevirt.core.kubevirt,yaml export ANSIBLE_PYTHON_INTERPRETER=auto_silent @@ -21,7 +20,3 @@ ansible-inventory -i test.label.kubevirt.yml -y --list --output label.yml "$@" ansible-inventory -i test.net.kubevirt.yml -y --list --output net.yml "$@" ansible-playbook verify.yml "$@" - -} || { - exit 1 -} diff --git a/tests/integration/targets/kubevirt_vm/runme.sh b/tests/integration/targets/kubevirt_vm/runme.sh index b879f4f..0551a5a 100755 --- a/tests/integration/targets/kubevirt_vm/runme.sh +++ b/tests/integration/targets/kubevirt_vm/runme.sh @@ -2,9 +2,8 @@ set -eux set -o pipefail -{ -export ANSIBLE_CALLBACKS_ENABLED=profile_tasks -export ANSIBLE_INVENTORY_ENABLED=kubevirt.core.kubevirt,yaml +export ANSIBLE_CALLBACKS_ENABLED=ansible.posix.profile_tasks +export ANSIBLE_INVENTORY_ENABLED=kubevirt.core.kubevirt [ -d files ] || mkdir files [ -f files/priv_key ] || (ssh-keygen -t ed25519 -C test@test -f files/priv_key ; ssh-keygen -y -f files/priv_key > files/pub_key) @@ -16,6 +15,3 @@ ansible-inventory -i test.kubevirt.yml -y --list "$@" ansible-playbook verify.yml -i test.kubevirt.yml --private-key=files/priv_key "$@" rm "$HOME/.ssh/known_hosts" -} || { - exit 1 -} diff --git a/tests/integration/targets/kubevirt_vm_info/runme.sh b/tests/integration/targets/kubevirt_vm_info/runme.sh index 820e399..af4a787 100755 --- a/tests/integration/targets/kubevirt_vm_info/runme.sh +++ b/tests/integration/targets/kubevirt_vm_info/runme.sh @@ -2,9 +2,6 @@ set -eux set -o pipefail -{ -export ANSIBLE_CALLBACKS_ENABLED=profile_tasks +export ANSIBLE_CALLBACKS_ENABLED=ansible.posix.profile_tasks + ansible-playbook playbook.yml "$@" -} || { - exit 1 -}