Skip to content

Commit 8d152f5

Browse files
committed
Assert we don't set initialDelaySeconds by default for any probes anymore
1 parent 62cc9b9 commit 8d152f5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/manifests/test_pod_probes.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ def assert_sensible_default_probe(template, probe_type):
5555
assert "periodSeconds" in probe, (
5656
f"{template_id(template)} has container {container['name']} with a {probe_type} missing a periodSeconds"
5757
)
58+
assert "initialDelaySeconds" in probe, (
59+
f"{template_id(template)} has container {container['name']} with a {probe_type} missing a "
60+
"initialDelaySeconds"
61+
)
62+
# We use startupProbes for this
63+
assert probe["initialDelaySeconds"] == 0, (
64+
f"{template_id(template)} has container {container['name']} with {probe_type}.initialDelaySeconds != 0 "
65+
"when we should be using a startupProbe"
66+
)
5867

5968
assert "httpGet" in probe or "exec" in probe or "tcpSocket" in probe
6069
if "httpGet" in probe:

0 commit comments

Comments
 (0)