mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-10 04:30:20 +02:00
feat(dns): add leak check report log
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package dns
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_leakCheck(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const timeout = 10 * time.Second
|
||||
ctx, cancel := context.WithTimeout(t.Context(), timeout)
|
||||
t.Cleanup(cancel)
|
||||
client := http.DefaultClient
|
||||
report, err := leakCheck(ctx, client)
|
||||
require.NoError(t, err)
|
||||
require.NotEmpty(t, report)
|
||||
}
|
||||
Reference in New Issue
Block a user