Skip to content

Commit

Permalink
Merge pull request #7284 from mook-as/bats/k3s-version-minimum-1.21
Browse files Browse the repository at this point in the history
BATS: Fix failures due to minimum version of 1.21
  • Loading branch information
jandubois authored Aug 2, 2024
2 parents 0901d49 + 41e2a0a commit e19fcfe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 41 deletions.
2 changes: 1 addition & 1 deletion bats/tests/k8s/specify-invalid-k8s-version.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ load '../helpers/load'
# No way there's a race-condition here.
# The version was checked and written to the log file before starting k8s,
# and we have to wait a few minutes before k8s is ready and we're at the next line.
assert_file_contains "$PATH_LOGS/kube.log" "Requested kubernetes version 'moose' is not a valid version. Falling back to the most recent stable version of"
assert_file_contains "$PATH_LOGS/kube.log" "Requested kubernetes version 'moose' is not a supported version. Falling back to"
}

# on macOS it still hangs without this
Expand Down
6 changes: 5 additions & 1 deletion bats/tests/k8s/up-downgrade-k8s.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Test cases 8, 13, 19

load '../helpers/load'
ARCH_FOR_KUBERLR=amd64

local_setup_file() {
if semver_eq "$RD_KUBERNETES_VERSION" "$RD_KUBERNETES_ALT_VERSION"; then
Expand All @@ -19,6 +18,11 @@ local_setup_file() {
export RD_KUBERNETES_VERSION_LOW=$RD_KUBERNETES_VERSION
export RD_KUBERNETES_VERSION_HIGH=$RD_KUBERNETES_ALT_VERSION
fi
case "$(uname -m)" in
amd64 | x86_64 | i*86) export ARCH_FOR_KUBERLR=amd64 ;;
arm*) export ARCH_FOR_KUBERLR=arm64 ;;
*) printf "Unsupported architecture %s\n" "$(uname -m)" | fail ;;
esac
}

@test 'factory reset' {
Expand Down
38 changes: 0 additions & 38 deletions bats/tests/k8s/verify-cached-images.bats

This file was deleted.

2 changes: 1 addition & 1 deletion bats/tests/profile/deployment.bats
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ api_set() {
assert_failure
assert_output --partial 'field "application.extensions.allowed.list" is locked'

run api_set '"kubernetes": {"version": "1.16.15"}'
run api_set '"kubernetes": {"version": "'"$KUBERNETES_RANDOM_VERSION"'"}'
assert_failure
assert_output --partial 'field "kubernetes.version" is locked'
}
Expand Down

0 comments on commit e19fcfe

Please sign in to comment.