From 02a050b47ef2a74661c1efdbddcc556691fad442 Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Tue, 2 Apr 2024 19:37:34 +0000 Subject: [PATCH] tests: k8s-seccomp.bats allow all policy Use the "allow all" policy for k8s-seccomp.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-seccomp.bats | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/integration/kubernetes/k8s-seccomp.bats b/tests/integration/kubernetes/k8s-seccomp.bats index c6a840cb3c..20d219dbdc 100644 --- a/tests/integration/kubernetes/k8s-seccomp.bats +++ b/tests/integration/kubernetes/k8s-seccomp.bats @@ -10,12 +10,15 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh" setup() { pod_name="seccomp-container" get_pod_config_dir + + yaml_file="${pod_config_dir}/pod-seccomp.yaml" + add_allow_all_policy_to_yaml "${yaml_file}" } @test "Support seccomp runtime/default profile" { expected_seccomp_mode="2" # Create pod - kubectl create -f "${pod_config_dir}/pod-seccomp.yaml" + kubectl create -f "${yaml_file}" # Wait it to complete cmd="kubectl get pods ${pod_name} | grep Completed" @@ -31,5 +34,5 @@ teardown() { echo "seccomp mode is ${seccomp_mode}, expected $expected_seccomp_mode" kubectl describe "pod/${pod_name}" - kubectl delete -f "${pod_config_dir}/pod-seccomp.yaml" || true + kubectl delete -f "${yaml_file}" || true }