github.com/Asutorufa/yuhaiin@v0.3.6-0.20240502055049-7984da7023a0/pkg/net/dns/server_test.go (about) 1 package dns 2 3 import ( 4 "testing" 5 "time" 6 7 "github.com/Asutorufa/yuhaiin/pkg/protos/config/dns" 8 "github.com/Asutorufa/yuhaiin/pkg/utils/assert" 9 ) 10 11 func TestServer(t *testing.T) { 12 z, err := New(Config{Type: dns.Type_doh, Host: "223.5.5.5"}) 13 assert.NoError(t, err) 14 15 s := NewServer("127.0.0.1:5353", z) 16 defer s.Close() 17 time.Sleep(time.Minute * 5) 18 }