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