From 3615e94d6881f6233d7c50b55a69a4ddab2779e2 Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Wed, 29 Sep 2021 13:35:17 -0700 Subject: [PATCH] Skip tests that violate version skew policy Signed-off-by: Brad Davidson --- scripts/test-helpers | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/test-helpers b/scripts/test-helpers index e987cfe753..61010178f0 100755 --- a/scripts/test-helpers +++ b/scripts/test-helpers @@ -314,6 +314,13 @@ test-setup() { return 1 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} [ -f $setupFile ] && source $setupFile