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