mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-04 02:14:29 +00:00
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:
@@ -13,11 +13,14 @@ setup() {
|
|||||||
|
|
||||||
pod_name="pod-oom"
|
pod_name="pod-oom"
|
||||||
get_pod_config_dir
|
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" {
|
@test "Test OOM events for pods" {
|
||||||
# Create pod
|
# Create pod
|
||||||
kubectl create -f "${pod_config_dir}/$pod_name.yaml"
|
kubectl create -f "${yaml_file}"
|
||||||
|
|
||||||
# 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"
|
||||||
|
Reference in New Issue
Block a user