Add test for IPv6 ExternalName service

This commit is contained in:
John Gardiner Myers 2023-05-06 16:59:39 -07:00
parent 41c705e471
commit 47a0f74f61

View File

@ -3295,7 +3295,7 @@ func TestExternalServices(t *testing.T) {
expectError bool
}{
{
"external services return an A endpoint for the external name that is an IP address",
"external services return an A endpoint for the external name that is an IPv4 address",
"",
"testing",
"foo",
@ -3313,6 +3313,25 @@ func TestExternalServices(t *testing.T) {
},
false,
},
{
"external services return an AAAA endpoint for the external name that is an IPv6 address",
"",
"testing",
"foo",
v1.ServiceTypeExternalName,
"",
"",
false,
map[string]string{"component": "foo"},
map[string]string{
hostnameAnnotationKey: "service.example.org",
},
"2001:db8::111",
[]*endpoint.Endpoint{
{DNSName: "service.example.org", Targets: endpoint.Targets{"2001:db8::111"}, RecordType: endpoint.RecordTypeAAAA},
},
false,
},
{
"external services return a CNAME endpoint for the external name that is a domain",
"",