decoupling Jenkins and LDAP

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2021-03-29 16:11:33 +08:00
parent ac275b6e98
commit 3e8597cf76
11 changed files with 674 additions and 163 deletions

View File

@@ -196,6 +196,10 @@ func checkAction(expected, actual core.Action, t *testing.T) {
user := object.(*iamv1alpha2.User)
expUser.Status.LastTransitionTime = nil
user.Status.LastTransitionTime = nil
if user.Status.State != nil {
disabled := iamv1alpha2.UserDisabled
expUser.Status.State = &disabled
}
if !reflect.DeepEqual(expUser, user) {
t.Errorf("Action %s %s has wrong object\nDiff:\n %s",
a.GetVerb(), a.GetResource().Resource, diff.ObjectGoPrintSideBySide(expObject, object))
@@ -239,7 +243,6 @@ func (f *fixture) expectUpdateUserStatusAction(user *iamv1alpha2.User) {
expect = expect.DeepCopy()
action = core.NewUpdateAction(schema.GroupVersionResource{Resource: "users"}, "", expect)
action.Subresource = "status"
f.actions = append(f.actions, action)
}