-
Notifications
You must be signed in to change notification settings - Fork 66
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 group change warning test for Active Directory #1043
Conversation
a54d3e0
to
de98d0c
Compare
Codecov Report
@@ Coverage Diff @@
## main #1043 +/- ##
==========================================
+ Coverage 79.36% 79.38% +0.02%
==========================================
Files 133 133
Lines 9992 9992
==========================================
+ Hits 7930 7932 +2
+ Misses 1789 1788 -1
+ Partials 273 272 -1
Continue to review full report at Codecov.
|
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.
Nice work 😄
requireKubectlGetNamespaceOutput(t, env, string(kubectlPtyOutputBytes2)) | ||
} | ||
// the output should include a warning that the groups have changed. | ||
require.Contains(t, string(kubectlPtyOutputBytes2), fmt.Sprintf("User %q has been added to the following groups: %q", sAMAccountName, []string{groupName + "@" + env.SupervisorUpstreamActiveDirectory.Domain})) |
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.
require.Contains(t, string(kubectlPtyOutputBytes2), fmt.Sprintf("User %q has been added to the following groups: %q", sAMAccountName, []string{groupName + "@" + env.SupervisorUpstreamActiveDirectory.Domain})) | |
require.Contains(t, string(kubectlPtyOutputBytes2), fmt.Sprintf(`%sWarning:%s User %q has been added to the following groups: %q`+"\r\n", yellowColor, resetColor, sAMAccountName, []string{groupName + "@" + env.SupervisorUpstreamActiveDirectory.Domain})) |
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.
I'll wait until #1042 merges, then rebase off of main so I can use the same color variables.
de98d0c
to
0160045
Compare
Also refactor some of the AD test helper functions Signed-off-by: Margo Crawford <margaretc@vmware.com>
0160045
to
f6ad5d5
Compare
Also refactor some of the AD test helper functions into their own file for easier sharing.
This is just a test change that adds a more "real world" test of our group refresh functionality. It actually changes the groups in Active Directory, rather than editing the groups in storage in order to make the supervisor think that the groups have changed when we get different ones back upon refresh.
Signed-off-by: Margo Crawford margaretc@vmware.com
Release note: