-
Notifications
You must be signed in to change notification settings - Fork 103
Migration of credential operation functions into framework #3635
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
base: main
Are you sure you want to change the base?
Conversation
Add helper function wrappers for HCP SDK credential operations. Implement both wait and no-wait variants of functions. Refactor admin credential lifecycle test case. https://issues.redhat.com/browse/ARO-23093
|
Skipping CI for Draft Pull Request. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mgahagan73, mvacula02 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/test e2e-parallel |
test/util/framework/hcp_helper.go
Outdated
| resourceGroupName string, | ||
| hcpClusterName string, | ||
| ) (*runtime.Poller[hcpsdk20240610preview.HcpOpenShiftClustersClientRequestAdminCredentialResponse], error) { | ||
| return hcpClient.BeginRequestAdminCredential(ctx, resourceGroupName, hcpClusterName, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this appears to simply wrap a one-line call in a different one-line call. This is a bad pattern.
test/util/framework/hcp_helper.go
Outdated
| resourceGroupName string, | ||
| hcpClusterName string, | ||
| ) (*runtime.Poller[hcpsdk20240610preview.HcpOpenShiftClustersClientRevokeCredentialsResponse], error) { | ||
| return hcpClient.BeginRevokeCredentials(ctx, resourceGroupName, hcpClusterName, nil) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment about questionable alias value and indirection
test/util/framework/hcp_helper.go
Outdated
| ProvisioningStateSucceeded = hcpsdk20240610preview.ProvisioningStateSucceeded | ||
| ProvisioningStateFailed = hcpsdk20240610preview.ProvisioningStateFailed | ||
| ProvisioningStateCanceled = hcpsdk20240610preview.ProvisioningStateCanceled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't vanity alias a constant.
|
New changes are detected. LGTM label has been removed. |
|
/test e2e-parallel |
ARO-23093
What
Add helper wrappers for HCP SDK credential operation functions to the test framework:
BeginRequestAdminCredential()
BeginRevokeCredentials()
Implement both wait and no-wait variants of both functions for future use.
Refactor admin credential lifecycle test, which uses credential operation functions.
Why
Explained in the JIRA ticket.