Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-26581

Refactor "Check cluster upgrade STS policies tags" test (flaky test)

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • None
    • Fleet Manager
    • None
    • 1
    • OSDFM Sprint 2
    • None

      Failure in gating test : integration canary
      Test:Check cluster upgrade STS policies tags.
      Debug status:
      Verified AWS roles and OCM STS roles manually for the cluster, they matched. This led me to believe there is an edge case in test case.
      This is my current finding.
      AWS account 968542149159 has 120+ IAM roles where the cluster's 10 STS roles are spread across multiple pages.
      The test was using ListRoles() which only returns the first 100 IAM roles from AWS. If an AWS account has more than 100 roles , the remaining roles are ignored, causing the test to fail intermittently.

      Fix in this MR :

      • Extract expected STS role names directly from OCM cluster details (OCM as source of truth)
      • Use direct GetRole() calls for each specific role

      Changes:

      1. Added extractRoleNameFromARN() helper to parse role names from ARNs
      2. Updated getClusterUpgradeInfo() to return STS role names from OCM (4 account + 6 operator roles)
      3. Refactored checkStsPolicies() to use GetRole() directly (no pagination needed)

              rh-ee-anfranci Anna Francis
              rh-ee-anfranci Anna Francis
              Anna Francis Anna Francis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: