tests: k8s-sysctls.bats allow all policy

Use the "allow all" policy for k8s-sysctls.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:39:13 +00:00
parent 839993f245
commit 04085d8442

View File

@@ -11,11 +11,14 @@ load "${BATS_TEST_DIRNAME}/tests_common.sh"
setup() {
pod_name="sysctl-test"
get_pod_config_dir
yaml_file="${pod_config_dir}/pod-sysctl.yaml"
add_allow_all_policy_to_yaml "${yaml_file}"
}
@test "Setting sysctl" {
# Create pod
kubectl apply -f "${pod_config_dir}/pod-sysctl.yaml"
kubectl apply -f "${yaml_file}"
# Check pod creation
kubectl wait --for=condition=Ready --timeout=$timeout pod $pod_name