mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
fix for deleting wildcard from r53. includes failing integration test
This commit is contained in:
@ -338,6 +338,8 @@ func makeTests(t *testing.T) []*TestCase {
|
|||||||
tc("Delete one", a("@", "1.2.3.4").ttl(500), a("www", "5.6.7.8").ttl(400)),
|
tc("Delete one", a("@", "1.2.3.4").ttl(500), a("www", "5.6.7.8").ttl(400)),
|
||||||
tc("Add back and change ttl", a("www", "5.6.7.8").ttl(700), a("www", "1.2.3.4").ttl(700)),
|
tc("Add back and change ttl", a("www", "5.6.7.8").ttl(700), a("www", "1.2.3.4").ttl(700)),
|
||||||
tc("Change targets and ttls", a("www", "1.1.1.1"), a("www", "2.2.2.2")),
|
tc("Change targets and ttls", a("www", "1.1.1.1"), a("www", "2.2.2.2")),
|
||||||
|
tc("Create wildcard", a("*", "1.2.3.4"), a("www", "1.1.1.1")),
|
||||||
|
tc("Delete wildcard", a("www", "1.1.1.1")),
|
||||||
|
|
||||||
// CNAMES
|
// CNAMES
|
||||||
tc("Empty"),
|
tc("Empty"),
|
||||||
|
@ -81,9 +81,7 @@ func (r *route53Provider) getZones() error {
|
|||||||
var nextMarker *string
|
var nextMarker *string
|
||||||
r.zones = make(map[string]*r53.HostedZone)
|
r.zones = make(map[string]*r53.HostedZone)
|
||||||
for {
|
for {
|
||||||
if nextMarker != nil {
|
|
||||||
fmt.Println(*nextMarker)
|
|
||||||
}
|
|
||||||
inp := &r53.ListHostedZonesInput{Marker: nextMarker}
|
inp := &r53.ListHostedZonesInput{Marker: nextMarker}
|
||||||
out, err := r.client.ListHostedZones(inp)
|
out, err := r.client.ListHostedZones(inp)
|
||||||
if err != nil && strings.Contains(err.Error(), "is not authorized") {
|
if err != nil && strings.Contains(err.Error(), "is not authorized") {
|
||||||
@ -212,7 +210,7 @@ func (r *route53Provider) GetDomainCorrections(dc *models.DomainConfig) ([]*mode
|
|||||||
delDesc += strings.Join(namesToUpdate[k], "\n") + "\n"
|
delDesc += strings.Join(namesToUpdate[k], "\n") + "\n"
|
||||||
// on delete just submit the original resource set we got from r53.
|
// on delete just submit the original resource set we got from r53.
|
||||||
for _, r := range records {
|
for _, r := range records {
|
||||||
if *r.Name == k.Name+"." && (*r.Type == k.Type || k.Type == "R53_ALIAS") {
|
if unescape(r.Name) == k.Name && (*r.Type == k.Type || k.Type == "R53_ALIAS") {
|
||||||
rrset = r
|
rrset = r
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user