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:
1 parent
7e2690d3c4
commit
e34c0dbb61
10 files changed
+80
-74
No files matched your search
@@ -75,10 +75,10 @@ tests:
|
||||
metrics.serviceMonitor.enabled: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.selector.matchLabels.app\.kubernetes\.io/name
|
||||
path: spec.selector.matchLabels["app.kubernetes.io/name"]
|
||||
value: jellyfin
|
||||
- equal:
|
||||
path: spec.selector.matchLabels.app\.kubernetes\.io/instance
|
||||
path: spec.selector.matchLabels["app.kubernetes.io/instance"]
|
||||
value: RELEASE-NAME
|
||||
|
||||
# =============================================================================
|
||||
@@ -91,7 +91,7 @@ tests:
|
||||
metrics.serviceMonitor.enabled: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels.app\.kubernetes\.io/name
|
||||
path: metadata.labels["app.kubernetes.io/name"]
|
||||
value: jellyfin
|
||||
|
||||
- it: should add custom labels when specified
|
||||
@@ -117,7 +117,7 @@ tests:
|
||||
custom: label
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels.app\.kubernetes\.io/name
|
||||
path: metadata.labels["app.kubernetes.io/name"]
|
||||
value: jellyfin
|
||||
- equal:
|
||||
path: metadata.labels.custom
|
||||
@@ -385,7 +385,7 @@ tests:
|
||||
metrics.serviceMonitor.labels: {}
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels.app\.kubernetes\.io/name
|
||||
path: metadata.labels["app.kubernetes.io/name"]
|
||||
value: jellyfin
|
||||
|
||||
- it: should handle empty relabelings array
|
||||
@@ -468,10 +468,10 @@ tests:
|
||||
metrics.serviceMonitor.enabled: true
|
||||
asserts:
|
||||
- equal:
|
||||
path: metadata.labels.app\.kubernetes\.io/name
|
||||
path: metadata.labels["app.kubernetes.io/name"]
|
||||
value: jellyfin
|
||||
- equal:
|
||||
path: metadata.labels.app\.kubernetes\.io/instance
|
||||
path: metadata.labels["app.kubernetes.io/instance"]
|
||||
value: RELEASE-NAME
|
||||
|
||||
- it: should always have exactly one endpoint
|
||||
|
||||
Reference in new issue
Block a user