Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AM-5152: Update confluent rbac role list integration test format to reflect a real API call #3020

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AydenAdair
Copy link
Contributor

Release Notes

This PR will not introduce any changes to a user of the Confluent CLI. This only updates one of our integration tests.

Checklist

  • I have successfully built and used a custom CLI binary, without linter issues from this PR.
  • I have clearly specified in the What section below whether this PR applies to Confluent Cloud, Confluent Platform, or both.
  • I have verified this PR in Confluent Cloud pre-prod or production environment, if applicable.
  • I have verified this PR in Confluent Platform on-premises environment, if applicable.
  • I have attached manual CLI verification results or screenshots in the Test & Review section below.
  • I have added appropriate CLI integration or unit tests for any new or updated commands and functionality.
  • I confirm that this PR introduces no breaking changes or backward compatibility issues.
  • I have indicated the potential customer impact if something goes wrong in the Blast Radius section below.
  • I have put checkmarks below confirming that the feature associated with this PR is enabled in:
    • Confluent Cloud prod
    • Confluent Cloud stag
    • Confluent Platform
    • Check this box if the feature is enabled for certain organizations only

What

The confluent rbac role list test was improperly formatted. This test was setup in a way to call multiple namespaces containing different roles in a single test. Over time, this test degraded and was setup to call the same namespace multiple times, resulting in the test showing a duplicated list of roles. This initial testing strategy came from a concept that customers could query our list endpoint for different role namespaces. The two issues with this are:

  1. We have migrated from this strategy, and now the default call to our RBAC list API returns all production roles across all namespaces
  2. The CLI did not have the ability to query on a per-namespace basis anyways, making this functionality pointless.

This test should not have a comprehensive list of all production roles, as that wouldn't really be testing anything of value and would require constant updates. Instead, this test has been modified to only return a few of our roles in a single namespace, which allows us to ensure the formatting of the output is correct, which is all we can gain from this test anyways.

Blast Radius

There is no end-user blast radius associated with this change, as it only touches an integration test and no public feature.

References

Previous CLI list update PR
AM-5152

Test & Review

The rbac cloud-list tests were updated to demonstrate these changes in behavior.

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

@AydenAdair AydenAdair marked this pull request as ready for review January 30, 2025 19:28
@AydenAdair AydenAdair requested a review from a team as a code owner January 30, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant