From 3f94e2ee1b9c971e88b122f12f36031f4f2cb8be Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Tue, 2 Apr 2024 19:33:58 +0000 Subject: [PATCH] tests: k8s-pod-quota.bats allow all policy Use the "allow all" policy for k8s-pod-quota.bats, instead of relying on the Kata Guest image to use the same policy as its default. Signed-off-by: Dan Mihai --- tests/integration/kubernetes/k8s-pod-quota.bats | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/kubernetes/k8s-pod-quota.bats b/tests/integration/kubernetes/k8s-pod-quota.bats index f74d8a595c..2d7f26ee3b 100644 --- a/tests/integration/kubernetes/k8s-pod-quota.bats +++ b/tests/integration/kubernetes/k8s-pod-quota.bats @@ -11,6 +11,9 @@ setup() { [ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: https://github.com/kata-containers/kata-containers/issues/7873" get_pod_config_dir + + deployment_yaml="${pod_config_dir}/pod-quota-deployment.yaml" + add_allow_all_policy_to_yaml "${deployment_yaml}" } @test "Pod quota" { @@ -25,7 +28,7 @@ setup() { --output=yaml | grep 'pods: "2"' # Create deployment - kubectl create -f "${pod_config_dir}/pod-quota-deployment.yaml" + kubectl create -f "${deployment_yaml}" # View deployment kubectl wait --for=condition=Available --timeout=$timeout \ @@ -39,6 +42,6 @@ teardown() { kubectl describe deployment ${deployment_name} # Clean-up - kubectl delete -f "${pod_config_dir}/pod-quota-deployment.yaml" + kubectl delete -f "${deployment_yaml}" kubectl delete -f "${pod_config_dir}/resource-quota.yaml" }