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
Added unit testing for LDAP group sync #5669
Added unit testing for LDAP group sync #5669
Conversation
63a542d
to
8505f8d
Compare
8505f8d
to
7450833
Compare
@deads2k This is next. Rebased and ready to go. |
// newDefaultTestGroup returns a new LDAP entry with the following characteristics: | ||
// dn: cn=testGroup,ou=groups,dc=example,dc=com | ||
// cn: testGroup | ||
func newDefaultTestGroup() *ldap.Entry { |
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 should accept the testGroupDN
as argument so that I don't have to know a global var to reason about the tests.
I think all three test files have will have similar comments. Update them all. |
27a32b7
to
5fc972d
Compare
@deads2k addressed comments |
"github.com/openshift/origin/pkg/auth/ldaputil/testclient" | ||
) | ||
|
||
func newTestADLDAPInterface(client ldap.Client) *ADLDAPInterface { |
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.
When you're making things like this in the future. BaseDN
is likely to be a string that test needs to know about and might care to change. Take it as an argument. Same one could be passed to newUser
and the proper DN could be built. This is good enough (with newTestUser
) that I'm willing to merge it.
lgtm [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4182/) (Image: devenv-rhel7_2834) |
Looks unrelated. @stevekuznetsov check for flake issue: https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4180/ re[merge] |
Evaluated for origin merge up to 5fc972d |
[Test]ing while waiting on the merge queue |
Evaluated for origin test up to 5fc972d |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7531/) |
#6065 again |
Merged by openshift-bot
@stevekuznetsov which one is next |
Addresses technical debt left over for the 3.1 push for LDAP group sync.
Depends on #5616
Depends on UPSTREAM go-ldap/ldap#38
/cc @deads2k @liggitt