Commit Graph
3 Commits
  • 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>
  • fix(charts): add automountServiceAccountToken and fix schema validations
    - Add automountServiceAccountToken to deployment.yaml template (was missing)
    - Fix image.repository pattern in schema to allow registry with port (e.g., registry.example.com:5000)
    - Add ExternalName to service.type enum in schema
    - Remove ExternalName tests from service_test.yaml and validation_mutual_exclusions_test.yaml (not implemented in template)
    - Fix integration test: change persistence.media.type from 'nfs' to 'hostPath' (nfs not supported)
    
    These fixes address test failures related to schema validation and missing template fields.
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Signed-off-by: Aleksei Sviridkin <f@lex.la>
  • test(charts): add deployment parameter tests and validation suite
    Phase 3: Create comprehensive tests for remaining deployment parameters
    and validation of mutual exclusions.
    
    New test files:
    - deployment_resources_test.yaml: Resources (CPU/memory/GPU), extra volumes,
      volume mounts, sidecar containers (70+ tests)
    - deployment_image_test.yaml: Image repository, tag, pullPolicy,
      imagePullSecrets for various registries (60+ tests)
    - deployment_jellyfin_test.yaml: Jellyfin-specific config including DLNA,
      metrics lifecycle hooks, command/args/env variables (70+ tests)
    - deployment_metadata_test.yaml: Names, labels, annotations, deployment
      strategy, revision history, replica count (70+ tests)
    - validation_mutual_exclusions_test.yaml: Critical validation tests using
      failedTemplate for NetworkPolicy conflicts, ServiceMonitor dependencies,
      persistence validations, port ranges (80+ tests)
    
    Critical validations tested:
    - NetworkPolicy vs DLNA/hostNetwork mutual exclusion (failedTemplate)
    - ServiceMonitor requires both metrics.enabled AND serviceMonitor.enabled
    - DLNA automatically enables hostNetwork and sets correct dnsPolicy
    - Persistence type validations (pvc/hostPath/emptyDir)
    - Port range validations (service.port: 1-65535, nodePort: 30000-32767)
    - DNS policy automatic configuration based on hostNetwork
    
    Edge cases covered:
    - Empty configuration arrays/objects
    - Multiple image pull secrets
    - Various env variable types (value, secretKeyRef, configMapKeyRef, fieldRef)
    - GPU and ephemeral-storage resources
    - All service types (ClusterIP, NodePort, LoadBalancer, ExternalName)
    
    Total: 5 new test files, 350+ new test cases
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    Signed-off-by: Aleksei Sviridkin <f@lex.la>