micro/util/dns/cache_test.go
Vasiliy Tolstov b6a0e4d983
All checks were successful
test / test (push) Successful in 46s
add metrics for dns
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2024-12-09 00:41:08 +03:00

23 lines
307 B
Go

package dns
import (
"net"
"testing"
)
func TestCache(t *testing.T) {
net.DefaultResolver = NewNetResolver(PreferIPV4(true))
addrs, err := net.LookupHost("unistack.org")
if err != nil {
t.Fatal(err)
}
addrs, err = net.LookupHost("unistack.org")
if err != nil {
t.Fatal(err)
}
_ = addrs
}