aboutsummaryrefslogtreecommitdiff
path: root/test/handler.go
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2021-09-16 13:52:46 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2021-09-16 13:52:46 +0200
commitdbd900371466edfdc7bb7f09080c6698e4f8e647 (patch)
tree46942c1b8956794da080bd0582f307d2ae618701 /test/handler.go
parenta08be6b395949a74efc8115a726112d64e96b44d (diff)
downloadbottin-dbd900371466edfdc7bb7f09080c6698e4f8e647.tar.gz
bottin-dbd900371466edfdc7bb7f09080c6698e4f8e647.zip
Disable reconnect in tests + some cosmetic changesbug/message-id
Diffstat (limited to 'test/handler.go')
-rw-r--r--test/handler.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/test/handler.go b/test/handler.go
index 43fad77..7b3e480 100644
--- a/test/handler.go
+++ b/test/handler.go
@@ -54,18 +54,6 @@ func (inst *instance) GenerateName() (name string) {
return
}
-//Handler to around the bug with MessageId
-func (inst *instance) Reconnect() (err error) {
- inst.logging.Close()
- inst.logging, err = ldap.Dial("tcp", fmt.Sprintf("%s:%d", adresse, port))
- if err != nil {
- return
- }
- err = inst.logging.Bind(bindusername, bindpassword)
- //logging.Debug("Reconnect succesful")
- return
-}
-
//Transform attributes in map format to the struct attributes
func MapAttToStruct(att map[string][]string) []attributes {
resultat := []attributes{}
@@ -88,7 +76,7 @@ func Connect() (*ldap.Conn, error) {
if key, ok := os.LookupEnv("BOTTIN_DEFAULT_ADMIN_PW"); ok {
bindpassword = key
}
-
+ //l.Debug.Enable(true)
err = l.Bind(bindusername, bindpassword)
logging.Debug("Connection succesful")
return l, err