feat(dns): add leak check report log

This commit is contained in:
Quentin McGaw
2026-03-16 13:57:14 +00:00
parent 85d2917e8e
commit 5e6c11b045
3 changed files with 160 additions and 0 deletions
+22
View File
@@ -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)
}