Source file
src/net/netgo_unix_test.go
Documentation: net
1
2
3
4
5
6
7
8 package net
9
10 import (
11 "context"
12 "testing"
13 )
14
15 func TestGoLookupIP(t *testing.T) {
16 defer dnsWaitGroup.Wait()
17 host := "localhost"
18 ctx := context.Background()
19 _, err, ok := cgoLookupIP(ctx, "ip", host)
20 if ok {
21 t.Errorf("cgoLookupIP must be a placeholder")
22 }
23 if err != nil {
24 t.Error(err)
25 }
26 if _, err := DefaultResolver.goLookupIP(ctx, host); err != nil {
27 t.Error(err)
28 }
29 }
30
View as plain text