mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-24 18:27:10 +00:00
tests: k8s: reduce policy testing complexity
Don't add the "allow all" policy to all the test YAML files anymore. After this change, the k8s tests assume that all the Kata CI Guest rootfs image files either: - Don't support Agent Policy at all, or - Include an "allow all" default policy. This relience/assumption will be addressed in a future commit. Fixes: #9395 Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
@@ -131,14 +131,6 @@ add_policy_to_yaml() {
|
||||
esac
|
||||
}
|
||||
|
||||
add_policy_to_successful_tests() {
|
||||
info "Add policy to test YAML files"
|
||||
for K8S_TEST_YAML in runtimeclass_workloads_work/*.yaml
|
||||
do
|
||||
add_policy_to_yaml "${K8S_TEST_YAML}"
|
||||
done
|
||||
}
|
||||
|
||||
test_successful_actions() {
|
||||
info "Test actions that must be successful"
|
||||
for K8S_TEST_ENTRY in ${K8S_TEST_UNION[@]}
|
||||
@@ -169,7 +161,6 @@ fi
|
||||
if policy_tests_enabled; then
|
||||
ensure_yq
|
||||
run_policy_specific_tests
|
||||
add_policy_to_successful_tests
|
||||
else
|
||||
info "Policy tests are disabled on this platform"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user