fix tests that involve HTTP clients

This commit is contained in:
aler9
2022-08-31 08:53:05 +02:00
parent f25e14183d
commit a8d1f91646
5 changed files with 10 additions and 14 deletions

View File

@@ -60,6 +60,10 @@ func httpRequest(method string, ur string, in interface{}, out interface{}) erro
}
func TestAPIConfigGet(t *testing.T) {
// since the HTTP server is created and deleted multiple times,
// we can't reuse TCP connections.
http.DefaultTransport.(*http.Transport).DisableKeepAlives = true
p, ok := newInstance("api: yes\n")
require.Equal(t, true, ok)
defer p.close()