From 61b8e4ce840746c074a4e9b3c9c0485bcbc636af Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Wed, 12 Nov 2025 02:56:56 +0000 Subject: [PATCH] Test the correct version when testing collection + upgrade (#12675) If we don't rebuild the collection and remove the previous archive we'll test the first built. --- tests/scripts/testcases_run.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/scripts/testcases_run.sh b/tests/scripts/testcases_run.sh index 04b9c9d4a..e64a3b9e3 100755 --- a/tests/scripts/testcases_run.sh +++ b/tests/scripts/testcases_run.sh @@ -24,17 +24,13 @@ fi export ANSIBLE_BECOME=true export ANSIBLE_BECOME_USER=root -# Test collection build and install by installing our collection, emptying our repository, adding -# cluster.yml, reset.yml, and remote-node.yml files that simply point to our collection's playbooks, and then -# running the same tests as before -if [[ "${TESTCASE}" =~ "collection" ]]; then - # Build and install collection - ansible-galaxy collection build - ansible-galaxy collection install kubernetes_sigs-kubespray-*.tar.gz -fi run_playbook () { if [[ "${TESTCASE}" =~ "collection" ]]; then playbook=kubernetes_sigs.kubespray.$1 + # Handle upgrade case properly + rm -f kubernetes_sigs-kubespray-*.tar.gz + ansible-galaxy collection build + ansible-galaxy collection install kubernetes_sigs-kubespray-*.tar.gz else playbook=$1.yml fi