mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 09:36:58 +02:00
Merge pull request #2857 from Volatus/master
bug: fix digital ocean provider not setting TTL
This commit is contained in:
commit
a68da28241
@ -172,7 +172,8 @@ func (p *DigitalOceanProvider) Records(ctx context.Context) ([]*endpoint.Endpoin
|
|||||||
name = zone.Name
|
name = zone.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
ep := endpoint.NewEndpoint(name, r.Type, r.Data)
|
ep := endpoint.NewEndpointWithTTL(name, r.Type, endpoint.TTL(r.TTL), r.Data)
|
||||||
|
|
||||||
endpoints = append(endpoints, ep)
|
endpoints = append(endpoints, ep)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -333,6 +333,17 @@ func TestDigitalOceanMakeDomainEditRequest(t *testing.T) {
|
|||||||
Data: "bar.example.com.",
|
Data: "bar.example.com.",
|
||||||
TTL: digitalOceanRecordTTL,
|
TTL: digitalOceanRecordTTL,
|
||||||
}, r3)
|
}, r3)
|
||||||
|
|
||||||
|
// Ensure that custom TTLs can be set
|
||||||
|
customTTL := 600
|
||||||
|
r4 := makeDomainEditRequest("example.com", "foo.example.com", endpoint.RecordTypeCNAME,
|
||||||
|
"bar.example.com.", customTTL)
|
||||||
|
assert.Equal(t, &godo.DomainRecordEditRequest{
|
||||||
|
Type: endpoint.RecordTypeCNAME,
|
||||||
|
Name: "foo",
|
||||||
|
Data: "bar.example.com.",
|
||||||
|
TTL: customTTL,
|
||||||
|
}, r4)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDigitalOceanApplyChanges(t *testing.T) {
|
func TestDigitalOceanApplyChanges(t *testing.T) {
|
||||||
|
Loading…
Reference in New Issue
Block a user