Add AAAA to supported record types

This commit is contained in:
John Gardiner Myers 2021-12-04 23:59:00 -08:00
parent 94d09b37dc
commit 9bb9a80c71
3 changed files with 7 additions and 3 deletions

View File

@ -17,10 +17,10 @@ limitations under the License.
package provider
// SupportedRecordType returns true only for supported record types.
// Currently A, CNAME, SRV, TXT and NS record types are supported.
// Currently A, AAAA, CNAME, SRV, TXT and NS record types are supported.
func SupportedRecordType(recordType string) bool {
switch recordType {
case "A", "CNAME", "SRV", "TXT", "NS":
case "A", "AAAA", "CNAME", "SRV", "TXT", "NS":
return true
default:
return false

View File

@ -27,6 +27,10 @@ func TestRecordTypeFilter(t *testing.T) {
"A",
true,
},
{
"AAAA",
true,
},
{
"CNAME",
true,

View File

@ -256,7 +256,7 @@ func TestProviderRecords(t *testing.T) {
endpoints, err := p.Records(context.TODO())
if assert.NoError(t, err) {
if assert.Equal(t, 2, len(endpoints)) {
if assert.Equal(t, 4, len(endpoints)) {
assert.Equal(t, "www.example.org", endpoints[0].DNSName)
assert.EqualValues(t, "@", endpoints[0].Targets[0])
assert.Equal(t, "CNAME", endpoints[0].RecordType)