helm-charts/charts/library/common-test/tests/ingress/presence_test.yaml
2023-09-14 15:40:49 +02:00

73 lines
1.5 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