tests: k8s: Update bats

We've seen some issues with tests not being run in
some of the Coco CI jobs (Issue #10451) and in the
envrionments that are more stable we noticed that
they had a newer version of bats installed.

Try updating the version to 1.10+ and print out
the version for debug purposes

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman 2024-10-24 10:28:14 +01:00
parent 06d2cc7239
commit 3f5bf9828b
2 changed files with 5 additions and 6 deletions

View File

@ -101,14 +101,11 @@ function create_cluster() {
}
function install_bats() {
# Installing bats from the lunar repo.
# This installs newer version of the bats which supports setup_file and teardown_file functions.
# These functions are helpful when adding new tests that require one time setup.
# Installing bats from the noble repo.
sudo apt install -y software-properties-common
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ lunar universe'
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ noble universe'
sudo apt install -y bats
sudo add-apt-repository --remove 'deb http://archive.ubuntu.com/ubuntu/ lunar universe'
sudo add-apt-repository --remove 'deb http://archive.ubuntu.com/ubuntu/ noble universe'
}
function install_kubectl() {

View File

@ -129,6 +129,8 @@ fi
ensure_yq
info "Running tests with bats version: $(bats --version)"
tests_fail=()
for K8S_TEST_ENTRY in ${K8S_TEST_UNION[@]}
do