mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 17:07:04 +02:00
feat(common): Release common library 3.7.1 (#383)
Co-authored-by: Aisling McGinn <me@aisling.dev>
This commit is contained in:
parent
c94a28baa3
commit
433f6d132b
146 changed files with 232 additions and 222 deletions
|
@ -1,132 +0,0 @@
|
|||
---
|
||||
# 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
|
Loading…
Add table
Add a link
Reference in a new issue