Skip to content

chore(e2e): sync DefaultClusterScopedRoleDisabled tests for principal/agent#1211

Open
cjcocokrisp wants to merge 2 commits into
redhat-developer:masterfrom
cjcocokrisp:chore/sync-e2e
Open

chore(e2e): sync DefaultClusterScopedRoleDisabled tests for principal/agent#1211
cjcocokrisp wants to merge 2 commits into
redhat-developer:masterfrom
cjcocokrisp:chore/sync-e2e

Conversation

@cjcocokrisp

Copy link
Copy Markdown

What type of PR is this?

/kind enhancement

What does this PR do / why we need it:

In Argo CD Operator PR #2237 there is a new e2e test added for both verifying the principal and agent for Argo CD Agent. This PR syncs those tests to this repo.

Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:

NA

Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

Run e2e tests and ensure that they pass.

…/agent

Signed-off-by: Christopher Coco <ccoco@redhat.com>
@openshift-ci openshift-ci Bot added the kind/enhancement New feature or request label Jul 10, 2026
@openshift-ci openshift-ci Bot requested review from jannfis and keithchong July 10, 2026 14:01
@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign anandf for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jul 10, 2026

Copy link
Copy Markdown

Hi @cjcocokrisp. Thanks for your PR.

I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 7ac7faf5-ecde-42ed-9b0d-38d6f0675754

📥 Commits

Reviewing files that changed from the base of the PR and between 2d93ce9 and c68ec9e.

📒 Files selected for processing (1)
  • test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Added end-to-end coverage for disabling and re-enabling default cluster-scoped RBAC resources, validating correct creation/removal of cluster-scoped vs namespaced RBAC.
    • Updated configuration validation checks to expect the Argo CD agent image version v0.5.1 (replacing the prior tag).
    • Standardized end-to-end test fixture usage across validation scenarios.
    • Continued verifying namespaced resources remain available while cluster-scoped RBAC is disabled.

Walkthrough

The E2E tests switch to shared fixture packages, update ArgoCD agent image expectations to v0.5.1, refine resource verification, and add coverage for toggling cluster-scoped RBAC through DefaultClusterScopedRoleDisabled.

Changes

ArgoCD agent E2E validation

Layer / File(s) Summary
Fixture and resource validation
test/openshift/e2e/ginkgo/sequential/1-051_validate_argocd_agent_principal_test.go, test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go
Fixture imports and resource verification wiring use the shared test packages; deletion checks explicitly cover agent resources.
Agent image configuration assertions
test/openshift/e2e/ginkgo/sequential/1-051_validate_argocd_agent_principal_test.go, test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go
Configuration-reflection tests set and verify quay.io/argoprojlabs/argocd-agent:v0.5.1.
Cluster-scoped RBAC transitions
test/openshift/e2e/ginkgo/sequential/1-051_validate_argocd_agent_principal_test.go, test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go
Tests verify ClusterRole and ClusterRoleBinding deletion, creation, and deletion as DefaultClusterScopedRoleDisabled is toggled.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant E2ETest
  participant ArgoCDCR
  participant Operator
  participant KubernetesAPI
  E2ETest->>ArgoCDCR: Toggle DefaultClusterScopedRoleDisabled
  ArgoCDCR->>Operator: Reconcile ArgoCD configuration
  Operator->>KubernetesAPI: Create or delete ClusterRole and ClusterRoleBinding
  E2ETest->>KubernetesAPI: Verify RBAC resource state
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: syncing E2E tests for DefaultClusterScopedRoleDisabled across principal and agent.
Description check ✅ Passed The description is directly related and explains that the PR syncs the new principal and agent E2E tests from upstream.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go`:
- Line 627: Correct the `By()` description in the relevant test to say “agent
enabled” instead of “principal enabled,” keeping the rest of the message
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 58eada41-5881-4fd5-aecb-d9153006f809

📥 Commits

Reviewing files that changed from the base of the PR and between 062ab2d and 2d93ce9.

📒 Files selected for processing (2)
  • test/openshift/e2e/ginkgo/sequential/1-051_validate_argocd_agent_principal_test.go
  • test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • argoproj-labs/argocd-operator (manual)

Comment thread test/openshift/e2e/ginkgo/sequential/1-052_validate_argocd_agent_agent_test.go Outdated
Signed-off-by: Christopher Coco <ccoco@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant