File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,11 +90,11 @@ setup() {
9090 echo " running integration test against policy group: $policy_group , constraint template: $template_name "
9191 # apply template
9292 wait_for_process ${WAIT_TIME} ${SLEEP_TIME} " kubectl apply -k $policy "
93+ local kind=$( yq e .metadata.name " $policy " /template.yaml)
9394 if [ " $POLICY_ENGINE " == " vap" ] && grep -q " engine: K8sNativeValidation" " $policy " /template.yaml; then
94- wait_for_process ${WAIT_TIME} ${SLEEP_TIME} " kubectl get ValidatingAdmissionPolicy gatekeeper-$template_name "
95+ wait_for_process ${WAIT_TIME} ${SLEEP_TIME} " kubectl get ValidatingAdmissionPolicy gatekeeper-$kind "
9596 vapb_exists=true
9697 fi
97- local kind=$( yq e .metadata.name " $policy " /template.yaml)
9898 for sample in " $policy " /samples/* ; do
9999 echo " testing sample constraint: $( basename " $sample " ) "
100100 # apply constraint
@@ -103,7 +103,7 @@ setup() {
103103 wait_for_process ${WAIT_TIME} ${SLEEP_TIME} " constraint_enforced $kind $name "
104104
105105 if [ vapb_exists == true ]; then
106- wait_for_process ${WAIT_TIME} ${SLEEP_TIME} " kubectl get ValidatingAdmissionPolicyBinding gatekeeper-$kind "
106+ wait_for_process ${WAIT_TIME} ${SLEEP_TIME} " kubectl get ValidatingAdmissionPolicyBinding gatekeeper-$name "
107107 deny_substr=" ValidatingAdmissionPolicy"
108108 fi
109109
You can’t perform that action at this time.
0 commit comments