mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-05 12:46:20 -03:00
another check
This commit is contained in:
@@ -233,6 +233,21 @@ tests:
|
||||
- failedTemplate:
|
||||
errorMessage: Ingress - Expected [hosts.host] to not start with [http://], but got [http://test-host]
|
||||
|
||||
- it: should fail with host contain ":"
|
||||
set:
|
||||
operator: *operator
|
||||
ingress:
|
||||
my-ingress:
|
||||
enabled: true
|
||||
primary: true
|
||||
hosts:
|
||||
- host: test-host:123
|
||||
paths:
|
||||
- path: /test-path
|
||||
asserts:
|
||||
- failedTemplate:
|
||||
errorMessage: Ingress - Expected [hosts.host] to not contain [:], but got [test-host:123]
|
||||
|
||||
- it: should fail without paths
|
||||
set:
|
||||
operator: *operator
|
||||
|
||||
@@ -51,6 +51,9 @@ objectData:
|
||||
{{- if (hasPrefix "https://" $host) -}}
|
||||
{{- fail (printf "Ingress - Expected [hosts.host] to not start with [https://], but got [%s]" $host) -}}
|
||||
{{- end -}}
|
||||
{{- if (contains ":" $host) -}}
|
||||
{{- fail (printf "Ingress - Expected [hosts.host] to not contain [:], but got [%s]" $host) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if not $h.paths -}}
|
||||
{{- fail "Ingress - Expected non-empty [hosts.paths]" -}}
|
||||
|
||||
Reference in New Issue
Block a user