-
Notifications
You must be signed in to change notification settings - Fork 394
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
✨ Add Custom access for binding tests #3262
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all |
/test all |
require.NoError(t, err, "failed to construct dynamic cluster client for server") | ||
|
||
// create a user with custom permissions | ||
framework.AdmitWorkspaceAccess(ctx, t, kubeClusterClient, universalPath, []string{"user"}, []string{"private-cowboys"}, true) |
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 creates a cluster role binding. You must use framework.Eventually
below to check that the permission is effective. Maybe do some innocent call before doing the Create you want to test.
}, | ||
}, | ||
} | ||
cowboysAPIExport, err = kcpClusterClient.Cluster(cowboysProviderPath).ApisV1alpha1().APIExports().Create(ctx, cowboysAPIExport, metav1.CreateOptions{}) |
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 is async to become effective. You must put a framework.Eventually
around the Create at the end of the test.
/test all |
@mjudeikis: The following tests failed, say
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/test-infra repository. I understand the commands that are listed here. |
Summary
This should work.
Related issue(s)
Fixes #
Release Notes