tests: k8s-projected-volume.bats allow all policy

Use the "allow all" policy for k8s-projected-volume.bats, instead of
relying on the Kata Guest image to use the same policy as its default.

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
Dan Mihai 2024-04-02 19:35:49 +00:00
parent 3f94e2ee1b
commit 543e40b80c

View File

@ -13,6 +13,9 @@ setup() {
[ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}" [ "${KATA_HYPERVISOR}" == "fc" ] && skip "test not working see: ${fc_limitations}"
get_pod_config_dir get_pod_config_dir
pod_yaml="${pod_config_dir}/pod-projected-volume.yaml"
add_allow_all_policy_to_yaml "${pod_yaml}"
} }
@test "Projected volume" { @test "Projected volume" {
@ -32,7 +35,7 @@ setup() {
kubectl create secret generic pass --from-file=$SECOND_TMP_FILE kubectl create secret generic pass --from-file=$SECOND_TMP_FILE
# Create pod # Create pod
kubectl create -f "${pod_config_dir}/pod-projected-volume.yaml" kubectl create -f "${pod_yaml}"
# Check pod creation # Check pod creation
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name" kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"