Uploaded image for project: 'Zero Trust Workload Identity Manager'
  1. Zero Trust Workload Identity Manager
  2. SPIRE-380

[e2e] create_only_mode , Upgradeable Condition , LabelPropagation Tests

XMLWordPrintable

    • Quality / Stability / Reliability
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • 2
    • OAPE Sprint 283, OAPE Sprint 284
    • 2
    • QE Confirmed

      This PR adds comprehensive e2e test coverage for three features:

      CreateOnlyMode Tests (PContext - Pending)

      Tests for CREATE_ONLY_MODE environment variable handling:

      • Baseline (no env var set)
      • CREATE_ONLY_MODE=true/false (lowercase)
      • CREATE_ONLY_MODE=TRUE/FALSE (uppercase, case-insensitive)
      • Invalid and empty string values
      • Env var removal transition

      Note: These tests are marked as PContext (pending/skipped) due to an operator bug where the CreateOnlyMode condition does not transition from True to False when the CREATE_ONLY_MODE env var is set to 'false' or removed. The condition remains stuck at True. Tests will be enabled once the operator bug is fixes available in the build

      UpgradeableCondition Tests

      Tests for OLM Upgradeable condition management:

      • Upgradeable=True when all operands are ready
      • Upgradeable=False when pods are deleted (SpireServer, SpireAgent, OIDC)
      • Recovery to Upgradeable=True after pod restoration
      • Multiple concurrent pod failures handling
      • Operator restart recovery
      • Condition field verification (type, status, reason, message)

      LabelPropagation Tests

      Tests for spec.labels propagation to workload metadata:

      • SpireServer → StatefulSet metadata.labels
      • SpireAgent → DaemonSet metadata.labels
      • SpiffeCSIDriver → DaemonSet metadata.labels
      • SpireOIDCDiscoveryProvider → Deployment metadata.labels
      • Label removal verification (clearing spec.labels)

      Utils Refactoring

      • Simplified containsAny() using strings.Contains
      • Extracted common verifyWorkloadLabel() helper to reduce duplication
      • Added WaitForDaemonSetLabelAbsent() helper for label removal tests
      • Added condition helpers: GetConditionByType, WaitForConditionStatus, WaitForConditionAbsent
      • Added OperatorCondition helpers for Upgradeable condition checks
      • Added label verification helpers for StatefulSet, DaemonSet, Deployment

              rh-ee-sayadas SAYAK DAS
              rh-ee-sayadas SAYAK DAS
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: