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

@@ -125,7 +125,7 @@ tests:
eks.amazonaws.com/role-arn: arn:aws:iam::123456789012:role/jellyfin-role
asserts:
- equal:
path: metadata.annotations.eks\.amazonaws\.com/role-arn
path: metadata.annotations["eks.amazonaws.com/role-arn"]
value: arn:aws:iam::123456789012:role/jellyfin-role
- it: should support multiple annotations
@@ -153,7 +153,7 @@ tests:
iam.gke.io/gcp-service-account: jellyfin@project-id.iam.gserviceaccount.com
asserts:
- equal:
path: metadata.annotations.iam\.gke\.io/gcp-service-account
path: metadata.annotations["iam.gke.io/gcp-service-account"]
value: jellyfin@project-id.iam.gserviceaccount.com
- it: should support Azure Workload Identity annotation
@@ -163,7 +163,7 @@ tests:
azure.workload.identity/client-id: 12345678-1234-1234-1234-123456789012
asserts:
- equal:
path: metadata.annotations.azure\.workload\.identity/client-id
path: metadata.annotations["azure.workload.identity/client-id"]
value: 12345678-1234-1234-1234-123456789012
# =============================================================================
@@ -243,10 +243,10 @@ tests:
path: metadata.name
value: jellyfin-prod-sa
- equal:
path: metadata.annotations.eks\.amazonaws\.com/role-arn
path: metadata.annotations["eks.amazonaws.com/role-arn"]
value: arn:aws:iam::123456789012:role/jellyfin
- equal:
path: metadata.annotations.custom\.io/annotation
path: metadata.annotations["custom.io/annotation"]
value: value
# =============================================================================
@@ -257,10 +257,10 @@ tests:
template: serviceaccount.yaml
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 use v1 API version
@@ -326,7 +326,7 @@ tests:
path: metadata.name
value: jellyfin-irsa
- equal:
path: metadata.annotations.eks\.amazonaws\.com/role-arn
path: metadata.annotations["eks.amazonaws.com/role-arn"]
value: arn:aws:iam::123456789012:role/jellyfin-s3-access
# Scenario: GCP Workload Identity
@@ -337,7 +337,7 @@ tests:
iam.gke.io/gcp-service-account: jellyfin@my-project.iam.gserviceaccount.com
asserts:
- equal:
path: metadata.annotations.iam\.gke\.io/gcp-service-account
path: metadata.annotations["iam.gke.io/gcp-service-account"]
value: jellyfin@my-project.iam.gserviceaccount.com
# Scenario: Minimal security (no automount)