Skip to content

Commit

Permalink
Use amazon.com for name resolution in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
9seconds committed Dec 10, 2020
1 parent db18025 commit b182582
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dns/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dns_test

import (
"context"
"net"
"testing"

"github.com/9seconds/httransform/v2/cache"
Expand All @@ -21,15 +22,13 @@ func (suite *DNSTestSuite) SetupTest() {

func (suite *DNSTestSuite) TestResolveNames() {
ctx := context.Background()
names, err := suite.cache.Lookup(ctx, "google.com")
names, err := suite.cache.Lookup(ctx, "amazon.com")

suite.NoError(err)

names2, err := suite.cache.Lookup(ctx, "google.com")
names2, err := net.DefaultResolver.LookupHost(ctx, "amazon.com")

suite.NoError(err)

suite.NotEqual(names, names2)
suite.ElementsMatch(names, names2)
}

Expand Down

0 comments on commit b182582

Please sign in to comment.