Skip to content

Commit

Permalink
fix: use current local dns resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
mloiseleur committed Apr 19, 2024
1 parent 9ff2223 commit c662dff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ func testServiceSourceNewServiceSource(t *testing.T) {

// testServiceSourceEndpoints tests that various services generate the correct endpoints.
func testServiceSourceEndpoints(t *testing.T) {
exampleDotComIPs, err := net.LookupIP("example.com")
assert.NoError(t, err)
t.Parallel()

for _, tc := range []struct {
Expand Down Expand Up @@ -406,8 +408,8 @@ func testServiceSourceEndpoints(t *testing.T) {
serviceTypesFilter: []string{},
resolveLoadBalancerHostname: true,
expected: []*endpoint.Endpoint{
{DNSName: "foo.example.org", RecordType: endpoint.RecordTypeA, Targets: endpoint.Targets{"93.184.215.14"}},
{DNSName: "foo.example.org", RecordType: endpoint.RecordTypeAAAA, Targets: endpoint.Targets{"2606:2800:21f:cb07:6820:80da:af6b:8b2c"}},
{DNSName: "foo.example.org", RecordType: endpoint.RecordTypeA, Targets: endpoint.Targets{exampleDotComIPs[1].String()}},
{DNSName: "foo.example.org", RecordType: endpoint.RecordTypeAAAA, Targets: endpoint.Targets{exampleDotComIPs[0].String()}},
},
},
{
Expand Down

0 comments on commit c662dff

Please sign in to comment.