feat(common): Release common library 3.7.1 (#383)

Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
Bernd Schorgers 2025-02-11 13:23:27 +01:00 committed by GitHub
parent c94a28baa3
commit 433f6d132b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
146 changed files with 232 additions and 222 deletions

View file

@ -0,0 +1,132 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
suite: ingress values
templates:
- common.yaml
values:
- ../_values/ingress_main_default_hosts.yaml
- ../_values/service_main_default.yaml
- ../_values/controllers_main_default_container.yaml
tests:
- it: default should pass
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: spec.rules[0].host
value: chart-example.local
- documentIndex: *IngressDocument
equal:
path: spec.rules[0].http.paths[0].path
value: "/"
- it: nameOverride should pass
set:
ingress.main:
nameOverride: test
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: metadata.name
value: RELEASE-NAME-test
- it: nameOverride with template should pass
set:
ingress.main:
nameOverride: "{{ .Release.Name }}"
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: metadata.name
value: RELEASE-NAME
- it: custom host and path should pass
set:
ingress.main:
hosts:
- host: chart-test.local
paths:
- path: /test
service:
identifier: main
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: spec.rules[0].host
value: chart-test.local
- documentIndex: *IngressDocument
equal:
path: spec.rules[0].http.paths[0].path
value: "/test"
- it: host with template should pass
set:
ingress.main:
hosts:
- host: "{{ .Release.Name }}.hostname"
paths:
- path: /
service:
identifier: main
port: http
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: spec.rules[0].host
value: RELEASE-NAME.hostname
- it: path with template should pass
set:
ingress.main:
hosts:
- host: chart-test.local
paths:
- path: "/{{ .Release.Name }}.path"
service:
identifier: main
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: spec.rules[0].http.paths[0].path
value: "/RELEASE-NAME.path"
- it: with defaultBackend should pass
set:
ingress.main:
defaultBackend:
resource:
apiGroup: k8s.example.com
kind: StorageBucket
name: static-assets
asserts:
- documentIndex: &IngressDocument 2
isKind:
of: Ingress
- documentIndex: *IngressDocument
equal:
path: spec.defaultBackend
value:
resource:
apiGroup: k8s.example.com
kind: StorageBucket
name: static-assets
- documentIndex: *IngressDocument
notExists:
path: spec.rules