From be3797ef7c77a59ee2a5e1930eb605252be5cfc2 Mon Sep 17 00:00:00 2001 From: Dan Mihai Date: Tue, 2 Apr 2024 19:23:36 +0000 Subject: [PATCH] tests: k8s-footloose.bats allow all policy Use the "allow all" policy for k8s-footloose.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-footloose.bats | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/kubernetes/k8s-footloose.bats b/tests/integration/kubernetes/k8s-footloose.bats index b8b10db7a6..47bf14f77b 100644 --- a/tests/integration/kubernetes/k8s-footloose.bats +++ b/tests/integration/kubernetes/k8s-footloose.bats @@ -23,6 +23,10 @@ setup() { sed -e "/\${ssh_key}/r ${public_key_path}" -e "/\${ssh_key}/d" \ "${pod_config_dir}/footloose-configmap.yaml" > "$configmap_yaml" sed -i 's/ssh-rsa/ ssh-rsa/' "$configmap_yaml" + + # Add an "allow all" policy to the pod yaml file. + pod_yaml="${pod_config_dir}/pod-footloose.yaml" + add_allow_all_policy_to_yaml "${pod_yaml}" } @test "Footloose pod" { @@ -33,7 +37,7 @@ setup() { kubectl create -f "$configmap_yaml" # Create pod - kubectl create -f "${pod_config_dir}/pod-footloose.yaml" + kubectl create -f "${pod_yaml}" # Check pod creation kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"