tests: k8s-empty-dirs.bats allow all policy

Use the "allow all" policy for k8s-empty-dirs.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:21:36 +00:00
parent ef22bd8a2b
commit 18f5e55667

View File

@ -21,11 +21,14 @@ setup() {
pod_name="sharevol-kata"
get_pod_config_dir
pod_logs_file=""
yaml_file="${pod_config_dir}/pod-empty-dir.yaml"
add_allow_all_policy_to_yaml "${yaml_file}"
}
@test "Empty dir volumes" {
# Create the pod
kubectl create -f "${pod_config_dir}/pod-empty-dir.yaml"
kubectl create -f "${yaml_file}"
# Check pod creation
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"