micro/util/dns/cache_test.go

21 lines
287 B
Go
Raw Normal View History

package dns
import (
"net"
"testing"
)
func TestCache(t *testing.T) {
net.DefaultResolver = NewNetResolver(PreferIPV4(true))
2024-12-09 15:57:55 +03:00
_, err := net.LookupHost("unistack.org")
if err != nil {
t.Fatal(err)
}
2024-12-09 15:57:55 +03:00
_, err = net.LookupHost("unistack.org")
if err != nil {
t.Fatal(err)
}
}