mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
fix tests that involve HTTP clients
This commit is contained in:
parent
f25e14183d
commit
a8d1f91646
5 changed files with 10 additions and 14 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue