LDAP: nitpicks (#18309)

* LDAP: nitpicks

* Add more tests

* Correct and clarify comment for Login() method

* Rename methods (hail consistency!)

* Uppercases first letter of the logs everywhere

* Moves method definitions around to more appropriate places

Fixes #18295
This commit is contained in:
Oleg Gaidarenko
2019-08-02 19:24:44 +03:00
committed by GitHub
parent 3063ef6c2a
commit fb273cb874
3 changed files with 108 additions and 59 deletions

View File

@ -146,7 +146,7 @@ func TestPublicAPI(t *testing.T) {
})
})
Convey("AuthAdmin()", t, func() {
Convey("AdminBind()", t, func() {
Convey("Should use admin DN and password", func() {
connection := &MockConnection{}
var actualUsername, actualPassword string
@ -166,7 +166,7 @@ func TestPublicAPI(t *testing.T) {
},
}
err := server.AuthAdmin()
err := server.AdminBind()
So(err, ShouldBeNil)
So(actualUsername, ShouldEqual, dn)
@ -193,7 +193,7 @@ func TestPublicAPI(t *testing.T) {
log: log.New("test-logger"),
}
err := server.AuthAdmin()
err := server.AdminBind()
So(err, ShouldEqual, expected)
})
})