mirror of
https://github.com/bjw-s-labs/helm-charts.git
synced 2025-07-04 08:57:04 +02:00
104 lines
2.2 KiB
YAML
104 lines
2.2 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json
|
|
suite: ingress presence
|
|
templates:
|
|
- common.yaml
|
|
tests:
|
|
- it: default should pass
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 2
|
|
- documentIndex: 0
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 1
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
|
|
- it: explicitly disabled should pass
|
|
set:
|
|
ingress.main.enabled: false
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 2
|
|
- documentIndex: 0
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 1
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
|
|
- it: explicitly enabled should pass
|
|
set:
|
|
ingress.main.enabled: true
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 3
|
|
- documentIndex: 0
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 1
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 2
|
|
isKind:
|
|
of: Ingress
|
|
|
|
- it: multiple enabled should pass
|
|
set:
|
|
ingress.main.enabled: true
|
|
ingress.test.enabled: true
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 4
|
|
- documentIndex: 0
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 1
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 2
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 3
|
|
isKind:
|
|
of: Ingress
|
|
|
|
- it: multiple with default enabled should pass
|
|
set:
|
|
ingress.main.enabled: true
|
|
ingress.test: {}
|
|
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 4
|
|
- documentIndex: 0
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: 1
|
|
not: true
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: &FirstIngressDocument 2
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: *FirstIngressDocument
|
|
equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME
|
|
- documentIndex: &SecondIngressDocument 3
|
|
isKind:
|
|
of: Ingress
|
|
- documentIndex: *SecondIngressDocument
|
|
equal:
|
|
path: metadata.name
|
|
value: RELEASE-NAME-test
|