From 2f1b87f21cd63bb782852457b8a14e2b0af722bb Mon Sep 17 00:00:00 2001 From: Stavros kois Date: Fri, 2 Dec 2022 00:19:14 +0200 Subject: [PATCH] add one more test --- .../tests/container_in_deployment/probe_test.yaml | 15 +++++++++++++++ .../1.0.0/templates/lib/container/_probes.tpl | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/library/common-test/tests/container_in_deployment/probe_test.yaml b/library/common-test/tests/container_in_deployment/probe_test.yaml index 5eeec11e2f..c7bc90b973 100644 --- a/library/common-test/tests/container_in_deployment/probe_test.yaml +++ b/library/common-test/tests/container_in_deployment/probe_test.yaml @@ -48,6 +48,21 @@ tests: - failedTemplate: errorMessage: Invalid probe name (invalid_probe_name). Valid options are (liveness, readiness, startup) + - it: should fail with probe type auto and port protocol UDP + set: + probes: + liveness: + type: AUTO + service: + main: + ports: + main: + port: 65535 + protocol: UDP + asserts: + - failedTemplate: + errorMessage: UDP Probes are not supported. Please use a different probe type or disable probes. + - it: should fail without commands on exec probe set: probes: diff --git a/library/common/1.0.0/templates/lib/container/_probes.tpl b/library/common/1.0.0/templates/lib/container/_probes.tpl index a645098e9f..02493f1567 100644 --- a/library/common/1.0.0/templates/lib/container/_probes.tpl +++ b/library/common/1.0.0/templates/lib/container/_probes.tpl @@ -60,7 +60,7 @@ {{- else if (eq $probeType "GRPC") }} {{- printf "grpc:" | nindent 2 }} {{- else if (eq $probeType "UDP") -}} - {{- fail "UDP Probes are not supported. Please use a different probe or disable probes." -}} + {{- fail "UDP Probes are not supported. Please use a different probe type or disable probes." -}} {{- end -}} {{- $probePort := $primaryPort.port -}}