From 3bafa8bceb991572a17cabf982f334084ce90d36 Mon Sep 17 00:00:00 2001 From: justusbunsi Date: Fri, 18 Oct 2024 16:30:00 +0200 Subject: [PATCH] Add more tests for current behavior Signed-off-by: justusbunsi --- unittests/deployment/probes.yaml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/unittests/deployment/probes.yaml b/unittests/deployment/probes.yaml index eadf8ec..6613ba1 100644 --- a/unittests/deployment/probes.yaml +++ b/unittests/deployment/probes.yaml @@ -52,3 +52,46 @@ tests: tcpSocket: port: http timeoutSeconds: 1 + + - it: allows overwriting the default port of the liveness probe + template: templates/gitea/deployment.yaml + set: + gitea: + livenessProbe: + tcpSocket: + port: my-port + asserts: + - isSubset: + path: spec.template.spec.containers[0].livenessProbe + content: + tcpSocket: + port: my-port + + - it: allows overwriting the default port of the readiness probe + template: templates/gitea/deployment.yaml + set: + gitea: + readinessProbe: + tcpSocket: + port: my-port + asserts: + - isSubset: + path: spec.template.spec.containers[0].readinessProbe + content: + tcpSocket: + port: my-port + + - it: allows overwriting the default port of the startup probe + template: templates/gitea/deployment.yaml + set: + gitea: + startupProbe: + enabled: true + tcpSocket: + port: my-port + asserts: + - isSubset: + path: spec.template.spec.containers[0].startupProbe + content: + tcpSocket: + port: my-port