Refactor health checks and wait until NGINX process ends
This commit is contained in:
parent
c85450c1e7
commit
c2935ca35c
15 changed files with 126 additions and 69 deletions
|
|
@ -35,12 +35,11 @@ import (
|
|||
func TestNginxCheck(t *testing.T) {
|
||||
mux := http.NewServeMux()
|
||||
|
||||
listener, err := net.Listen("unix", nginx.StatusSocket)
|
||||
listener, err := net.Listen("tcp", fmt.Sprintf(":%v", nginx.StatusPort))
|
||||
if err != nil {
|
||||
t.Fatalf("crating unix listener: %s", err)
|
||||
t.Fatalf("crating tcp listener: %s", err)
|
||||
}
|
||||
defer listener.Close()
|
||||
defer os.Remove(nginx.StatusSocket)
|
||||
|
||||
server := &httptest.Server{
|
||||
Listener: listener,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue