mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-05 17:16:59 +02:00
fix: use current local dns resolution
This commit is contained in:
parent
9ff2223625
commit
cbd281f81b
@ -173,6 +173,11 @@ func testServiceSourceNewServiceSource(t *testing.T) {
|
||||
|
||||
// testServiceSourceEndpoints tests that various services generate the correct endpoints.
|
||||
func testServiceSourceEndpoints(t *testing.T) {
|
||||
exampleDotComIP4, err := net.DefaultResolver.LookupNetIP(context.Background(), "ip4", "example.com")
|
||||
assert.NoError(t, err)
|
||||
exampleDotComIP6, err := net.DefaultResolver.LookupNetIP(context.Background(), "ip6", "example.com")
|
||||
assert.NoError(t, err)
|
||||
|
||||
t.Parallel()
|
||||
|
||||
for _, tc := range []struct {
|
||||
@ -406,8 +411,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{exampleDotComIP4[0].String()}},
|
||||
{DNSName: "foo.example.org", RecordType: endpoint.RecordTypeAAAA, Targets: endpoint.Targets{exampleDotComIP6[0].String()}},
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user