Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 994321e

Browse files
authored
Merge pull request #1011 from GabyCT/topic/fixquota
test: Fix K8s pod quota test
2 parents 028bf1c + 362bedb commit 994321e

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

integration/kubernetes/k8s-pod-quota.bats

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ setup() {
1818
@test "Pod quota" {
1919
resource_name="pod-quota"
2020
deployment_name="deploymenttest"
21+
wait_time=10
22+
sleep_time=2
2123

2224
# Create the resourcequota
2325
sudo -E kubectl create -f "${pod_config_dir}/resource-quota.yaml"
@@ -29,7 +31,8 @@ setup() {
2931
sudo -E kubectl create -f "${pod_config_dir}/pod-quota-deployment.yaml"
3032

3133
# View information about the deployment
32-
sudo -E kubectl get deployment "$deployment_name" --output=yaml | grep "forbidden: exceeded quota"
34+
cmd="sudo -E kubectl get deployment \"$deployment_name\" --output=yaml | grep -q 'forbidden: exceeded quota'"
35+
waitForProcess "$wait_time" "$sleep_time" "$cmd"
3336
}
3437

3538
teardown() {

integration/kubernetes/runtimeclass_workloads/pod-quota-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ spec:
2121
containers:
2222
- name: pod-quota-demo
2323
image: busybox
24+
command: ["tail", "-f", "/dev/null"]

integration/kubernetes/untrusted_workloads/pod-quota-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ spec:
2323
containers:
2424
- name: pod-quota-demo
2525
image: busybox
26+
command: ["tail", "-f", "/dev/null"]

0 commit comments

Comments
 (0)