Skip to content

Commit b0fb793

Browse files
committed
Add test for wait with 0 timeout
1 parent 8d67437 commit b0fb793

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/cmd/wait.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,14 @@ EOF
105105
output_message_1=$(kubectl wait \
106106
--for='jsonpath=spec.template.spec.containers[?(@.name=="busybox")].image=busybox' \
107107
deploy/test-3)
108+
# Command: Wait with jsonpath without value with check-once behavior
109+
output_message_2=$(kubectl wait --for=jsonpath='{.status.replicas}' deploy/test-3 --timeout=0 2>&1)
108110
set -o errexit
109111

110112
# Post-Condition: Wait succeed
111113
kube::test::if_has_string "${output_message_0}" 'deployment.apps/test-3 condition met'
112114
kube::test::if_has_string "${output_message_1}" 'deployment.apps/test-3 condition met'
115+
kube::test::if_has_string "${output_message_2}" 'deployment.apps/test-3 condition met'
113116

114117
# Clean deployment
115118
kubectl delete deployment test-3

0 commit comments

Comments
 (0)