From 201cdfa7dd62087379a7d06215ba54ef67a92539 Mon Sep 17 00:00:00 2001 From: Jaydip Gabani Date: Wed, 4 Dec 2024 01:51:41 +0000 Subject: [PATCH] updating vap tests Signed-off-by: Jaydip Gabani --- test/bats/test.bats | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/bats/test.bats b/test/bats/test.bats index e000324703c..8d546cc4555 100644 --- a/test/bats/test.bats +++ b/test/bats/test.bats @@ -61,10 +61,6 @@ teardown_file() { } @test "vap test" { - minor_version=$(echo "$KUBERNETES_VERSION" | cut -d'.' -f2) - if [ "$minor_version" -lt 28 ] || [ -z $ENABLE_VAP_TESTS ]; then - skip "skipping vap tests" - fi local api="$(kubectl api-resources | grep validatingadmission)" if [[ -z "$api" ]]; then echo "vap is not enabled for the cluster. skip vap test" @@ -97,6 +93,7 @@ teardown_file() { kubectl delete --ignore-not-found -f ${BATS_TESTS_DIR}/constraints/all_ns_must_have_label_provided_vapbinding_scoped.yaml wait_for_process ${WAIT_TIME} ${SLEEP_TIME} "kubectl delete --ignore-not-found -f ${BATS_TESTS_DIR}/templates/k8srequiredlabels_template_vap.yaml" + kubectl get validatingadmissionpolicybinding gatekeeper-all-must-have-label-scoped || kubectl get validatingadmissionpolicybinding gatekeeper-all-must-have-label fi }