tests: k8s: k8s-oom.bats auto-generated policy

Auto-generate policy for k8s-oom.bats.

Fixes: #9072

Signed-off-by: Dan Mihai <dmihai@microsoft.com>
This commit is contained in:
Dan Mihai
2024-02-12 01:52:15 +00:00
parent 26a77d67f4
commit 74a52c6d25

View File

@@ -13,11 +13,14 @@ setup() {
pod_name="pod-oom"
get_pod_config_dir
yaml_file="${pod_config_dir}/$pod_name.yaml"
auto_generate_policy "${pod_config_dir}" "${yaml_file}"
}
@test "Test OOM events for pods" {
# Create pod
kubectl create -f "${pod_config_dir}/$pod_name.yaml"
kubectl create -f "${yaml_file}"
# Check pod creation
kubectl wait --for=condition=Ready --timeout=$timeout pod "$pod_name"