aboutsummaryrefslogtreecommitdiff
path: root/server_test.go
diff options
context:
space:
mode:
authorMarin Ivanov <[email protected]>2019-02-13 05:51:53 +0200
committerMarin Ivanov <[email protected]>2019-02-13 06:27:18 +0200
commit3ccc4a9a572ecb0a5decbad8d20fbbb64938186e (patch)
treef5beb83a40ee4fe60957402d87e54ab1f7e8d064 /server_test.go
parent2433beed9d9365af0a54e376c6b5ce97963d7bc3 (diff)
Fix SSL test
Diffstat (limited to 'server_test.go')
-rw-r--r--server_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/server_test.go b/server_test.go
index 9cde9d7..5df97a2 100644
--- a/server_test.go
+++ b/server_test.go
@@ -522,7 +522,6 @@ func TestBindSimpleFailBadDn(t *testing.T) {
/////////////////////////
func TestBindSSL(t *testing.T) {
- t.Skip("unclear how to configure ldapsearch command to trust or skip verification of a custom SSL cert")
longerTimeout := 300 * time.Millisecond
done := make(chan bool)
s := NewServer()
@@ -550,10 +549,11 @@ func TestBindSSL(t *testing.T) {
go func() {
time.Sleep(longerTimeout)
- cmd := exec.Command("ldapsearch", "-H", ldapURLSSL, "-x", "-b", "o=testers,c=test")
+ cmd := exec.Command("ldapsearch", "-H", ldapURLSSL, "-d", "1", "-x", "-b", "o=testers,c=test")
+ cmd.Env = append(cmd.Env, "LDAPRC=tests/ldaprc")
out, err := cmd.CombinedOutput()
if err != nil {
- t.Error(err)
+ t.Errorf("Command output:\n%v\nError:\n%s", string(out), err.Error())
return
}
if !strings.Contains(string(out), "result: 0 Success") {