fix(tests): fix label/annotation paths and add missing templates

- Replace escaped dot notation (app\.kubernetes\.io/name) with bracket notation (["app.kubernetes.io/name"])
- Add missing templates to test suites (service.yaml, ingress.yaml, httpRoute.yaml, serviceaccount.yaml, persistentVolumeClaim.yaml)
- This fixes 40+ test failures related to unknown paths in labels and annotations

Test progress: 535/603 passing (89%), up from 495/603 (82%)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
Aleksei SviridkinandClaude committed 2025-11-08 17:46:43 +03:00 Unverified
1 parent 7e2690d3c4
commit e34c0dbb61
10 files changed
+80 -74

No files matched your search

@@ -111,7 +111,7 @@ tests:
- isNotNull:
path: spec.ingress[1].from[0].namespaceSelector
- equal:
path: spec.ingress[1].from[0].namespaceSelector.matchLabels.kubernetes.io/metadata.name
path: spec.ingress[1].from[0].namespaceSelector.matchLabels["kubernetes.io/metadata.name"]
value: monitoring
- it: should add custom ingress rules
@@ -163,7 +163,7 @@ tests:
networkPolicy.egress.dnsNamespace: custom-dns-ns
asserts:
- equal:
path: spec.egress[0].to[0].namespaceSelector.matchLabels.kubernetes.io/metadata.name
path: spec.egress[0].to[0].namespaceSelector.matchLabels["kubernetes.io/metadata.name"]
value: custom-dns-ns
- it: should allow custom DNS pod selector
@@ -290,10 +290,10 @@ tests:
networkPolicy.enabled: true
asserts:
- equal:
path: spec.podSelector.matchLabels.app\.kubernetes\.io/name
path: spec.podSelector.matchLabels["app.kubernetes.io/name"]
value: jellyfin
- equal:
path: spec.podSelector.matchLabels.app\.kubernetes\.io/instance
path: spec.podSelector.matchLabels["app.kubernetes.io/instance"]
value: RELEASE-NAME
# =============================================================================