Skip tests that violate version skew policy

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2021-09-29 13:35:17 -07:00 committed by Brad Davidson
parent 9e66f975d5
commit 0af55a830a

View File

@ -314,6 +314,13 @@ test-setup() {
return 1 return 1
fi fi
SERVER_MINOR=$(awk -F. '{print $2}' <<<${K3S_IMAGE_SERVER:-$K3S_IMAGE})
AGENT_MINOR=$(awk -F. '{print $2}' <<<${K3S_IMAGE_AGENT:-$K3S_IMAGE})
if [ $AGENT_MINOR -gt $SERVER_MINOR ]; then
echo "Agent minor version cannot be newer than server - not supported by Kubernetes version skew policy"
exit 0
fi
local setupFile=./scripts/test-setup-${TEST_TYPE} local setupFile=./scripts/test-setup-${TEST_TYPE}
[ -f $setupFile ] && source $setupFile [ -f $setupFile ] && source $setupFile