Skip to content

Commit

Permalink
Testcase for dualstack externalIPs added
Browse files Browse the repository at this point in the history
  • Loading branch information
dromie committed Nov 9, 2023
1 parent d7b0dfd commit 04e92c5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions source/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3629,6 +3629,27 @@ func TestExternalServices(t *testing.T) {
},
false,
},
{
"annotated ExternalName service with externalIPs of dualstack addresses returns 2 endpoints with multiple targets",
"",
"testing",
"foo",
v1.ServiceTypeExternalName,
"",
"",
false,
map[string]string{"component": "foo"},
map[string]string{
hostnameAnnotationKey: "service.example.org",
},
"service.example.org",
[]string{"10.2.3.4", "11.2.3.4", "2001:db8::1", "2001:db8::2"},
[]*endpoint.Endpoint{
{DNSName: "service.example.org", RecordType: endpoint.RecordTypeA, Targets: endpoint.Targets{"10.2.3.4", "11.2.3.4"}},
{DNSName: "service.example.org", RecordType: endpoint.RecordTypeAAAA, Targets: endpoint.Targets{"2001:db8::1", "2001:db8::2"}},
},
false,
},
} {
tc := tc
t.Run(tc.title, func(t *testing.T) {
Expand Down

0 comments on commit 04e92c5

Please sign in to comment.