File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
charts/aws-ebs-csi-driver/templates/tests Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -220,8 +220,23 @@ spec:
220220 else
221221 FOCUS_REGEX="${FOCUS_REGEX})"
222222 fi
223- export KUBE_VERSION=$(kubectl version --output json | jq -r '.serverVersion.major + "." + .serverVersion.minor')
224- kubetest2 noop --run-id='e2e-kubernetes' --test=ginkgo -- --test-package-version="$(curl -L https://dl.k8s.io/release/stable-${KUBE_VERSION}.txt)" --skip-regex='[Disruptive]|[Serial]' --focus-regex="$FOCUS_REGEX" --parallel=25 --test-args='-storage.testdriver=/etc/config/manifests.yaml'
223+
224+ echo "Detecting Kubernetes server version"
225+ export KUBE_VERSION=$(kubectl version --output json | jq -r '.serverVersion.major + "." + .serverVersion.minor' | sed 's/[^0-9.]*$//')
226+ echo "Detected KUBE_VERSION=${KUBE_VERSION}"
227+
228+ echo "Fetching the stable test package version for KUBE_VERSION=${KUBE_VERSION}"
229+ test_package_version=$(curl -L https://dl.k8s.io/release/stable-${KUBE_VERSION}.txt 2>/dev/null)
230+
231+ if echo "$test_package_version" | grep -q "Error"; then
232+ echo "Error: Failed to fetch test package version for KUBE_VERSION=${KUBE_VERSION}. Exiting."
233+ exit 1
234+ fi
235+ echo "Fetched test package version ${test_package_version}"
236+
237+ echo "Starting kubetest2 with ginkgo tests..."
238+ kubetest2 noop --run-id='e2e-kubernetes' --test=ginkgo -- --test-package-version="$test_package_version" --skip-regex='[Disruptive]|[Serial]' --focus-regex="$FOCUS_REGEX" --parallel=25 --test-args='-storage.testdriver=/etc/config/manifests.yaml'
239+ echo "kubetest2 test run completed."
225240 volumeMounts :
226241 - name : config-vol
227242 mountPath : /etc/config
You can’t perform that action at this time.
0 commit comments