diff --git a/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml b/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml index 16a5bf9217..e5b843b0dc 100644 --- a/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml +++ b/charts/aws-ebs-csi-driver/templates/tests/helm-tester.yaml @@ -214,11 +214,14 @@ spec: kubectl config set-context kubetest2 --cluster=cluster kubectl config set-credentials sa --token=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token) kubectl config set-context kubetest2 --user=sa && kubectl config use-context kubetest2 - export FOCUS_REGEX='\bebs.csi.aws.com\b.+(validate content|resize volume|offline PVC|AllowedTopologies|store data$SNAPSHOTS)' + export FOCUS_REGEX='\bebs.csi.aws.com\b.+(validate content|resize volume|offline PVC|AllowedTopologies|store data' if kubectl get crd volumesnapshots.snapshot.storage.k8s.io; then - FORCUS_REGEX="${FOCUS_REGEX}|snapshot fields" + FOCUS_REGEX="${FOCUS_REGEX}|snapshot fields)" + else + FOCUS_REGEX="${FOCUS_REGEX})" fi - kubetest2 noop --run-id='e2e-kubernetes' --test=ginkgo -- --test-package-version="$(curl -L https://dl.k8s.io/release/stable-1.29.txt)" --skip-regex='[Disruptive]|[Serial]' --focus-regex="$FOCUS_REGEX" --parallel=25 --test-args='-storage.testdriver=/etc/config/manifests.yaml' + export KUBE_VERSION=$(kubectl version --output json | jq -r '.serverVersion.major + "." + .serverVersion.minor') + 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' volumeMounts: - name: config-vol mountPath: /etc/config