Skip to content

Commit 8572740

Browse files
committed
chore(lookup): update tests with the new api
Signed-off-by: Yagiz Degirmenci <yagizcanilbey1903@gmail.com>
1 parent e0f8e25 commit 8572740

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pkg/lookup/host_test.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ package lookup
44

55
import (
66
"context"
7-
"log"
7+
"github.com/ycd/dstp/pkg/common"
8+
"sync"
89
"testing"
910
)
1011

1112
func TestLookup(t *testing.T) {
12-
out, err := Host(context.Background(), "jvns.ca")
13+
var wg sync.WaitGroup
14+
var result common.Result
15+
err := Host(context.Background(), &wg, "jvns.ca", &result)
1316
if err != nil {
1417
t.Fatal(err)
1518
}
1619

17-
log.Println(out.String())
18-
20+
if result.SystemDNS == "" {
21+
t.Fatal(err)
22+
}
1923
}

0 commit comments

Comments
 (0)