random port for couper test instances
@@ -61,8 +61,10 @@ func TestHTTPServer_ServeHTTP_Files(t *testing.T) {
t.Fatal(err)
}
+ conf.Addr = ":"
gw := server.New(ctx, log.WithContext(ctx), conf)
gw.Listen()
+ defer gw.Close()
connectClient := http.Client{Transport: &http.Transport{
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
@@ -147,9 +149,10 @@ func TestHTTPServer_ServeHTTP_Files2(t *testing.T) {
t.Fatal(err)
}
+ conf.Addr = ":"
couper := server.New(ctx, log.WithContext(ctx), conf)
couper.Listen()
- //defer couper.Close()
+ defer couper.Close()
connectClient := http.Client{
Transport: &http.Transport{
