diff options
| author | Mark Rushakoff <[email protected]> | 2018-02-23 12:06:02 -0800 |
|---|---|---|
| committer | Mark Rushakoff <[email protected]> | 2018-02-23 12:06:02 -0800 |
| commit | 2129d915cdf28ee389ae3f234136681c73bcd8be (patch) | |
| tree | d2cee01faf5bcc3e5c3d4df5356079db1d66bbfc /server_modify_test.go | |
| parent | b7ccda6592ab6b7c821a5d9a5ab5a28cba8bb094 (diff) | |
Remove QuitChannel method, add Close method
Diffstat (limited to 'server_modify_test.go')
| -rw-r--r-- | server_modify_test.go | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/server_modify_test.go b/server_modify_test.go index 378fbd1..7050a32 100644 --- a/server_modify_test.go +++ b/server_modify_test.go @@ -10,11 +10,10 @@ import ( // func TestAdd(t *testing.T) { - quit := make(chan bool) done := make(chan bool) + s := NewServer() + defer s.Close() go func() { - s := NewServer() - s.QuitChannel(quit) s.BindFunc("", modifyTestHandler{}) s.AddFunc("", modifyTestHandler{}) if err := s.ListenAndServe(listenString); err != nil { @@ -42,16 +41,14 @@ func TestAdd(t *testing.T) { case <-time.After(timeout): t.Errorf("ldapadd command timed out") } - quit <- true } // func TestDelete(t *testing.T) { - quit := make(chan bool) done := make(chan bool) + s := NewServer() + defer s.Close() go func() { - s := NewServer() - s.QuitChannel(quit) s.BindFunc("", modifyTestHandler{}) s.DeleteFunc("", modifyTestHandler{}) if err := s.ListenAndServe(listenString); err != nil { @@ -76,15 +73,13 @@ func TestDelete(t *testing.T) { case <-time.After(timeout): t.Errorf("ldapdelete command timed out") } - quit <- true } func TestModify(t *testing.T) { - quit := make(chan bool) done := make(chan bool) + s := NewServer() + defer s.Close() go func() { - s := NewServer() - s.QuitChannel(quit) s.BindFunc("", modifyTestHandler{}) s.ModifyFunc("", modifyTestHandler{}) if err := s.ListenAndServe(listenString); err != nil { @@ -109,7 +104,6 @@ func TestModify(t *testing.T) { case <-time.After(timeout): t.Errorf("ldapadd command timed out") } - quit <- true } /* |
