server-mux: Simplify graceful shutdown behavior (#3681)

`*http.Server` is no more used, doing some cleanup.
This commit is contained in:
Anis Elleuch
2017-02-04 07:53:30 +01:00
committed by Harshavardhana
parent ed4fcb63f7
commit b6ebf2aba8
5 changed files with 105 additions and 169 deletions

View File

@@ -19,7 +19,6 @@ package cmd
import (
"errors"
"flag"
"net/http"
"os"
"reflect"
"runtime"
@@ -120,9 +119,7 @@ func TestFinalizeAPIEndpoints(t *testing.T) {
}
for i, test := range testCases {
endPoints, err := finalizeAPIEndpoints(&http.Server{
Addr: test.addr,
})
endPoints, err := finalizeAPIEndpoints(test.addr)
if err != nil && len(endPoints) <= 0 {
t.Errorf("Test case %d returned with no API end points for %s",
i+1, test.addr)