Updated test_route53.test_rrset() for batch update
* This should provide a test for [spulec/moto#84]. * Prior to deleting the existing A record, it sends a batch update that includes DELETE and a CREATE, which is what boto performs when updating a ResourceRecord.
This commit is contained in:
parent
eb93a2bcd1
commit
1971af9032
1 changed files with 10 additions and 0 deletions
|
|
@ -56,6 +56,16 @@ def test_rrset():
|
||||||
rrsets = conn.get_all_rrsets(zoneid, type="CNAME")
|
rrsets = conn.get_all_rrsets(zoneid, type="CNAME")
|
||||||
rrsets.should.have.length_of(0)
|
rrsets.should.have.length_of(0)
|
||||||
|
|
||||||
|
changes = ResourceRecordSets(conn, zoneid)
|
||||||
|
changes.add_change("DELETE", "foo.bar.testdns.aws.com", "A")
|
||||||
|
change = changes.add_change("CREATE", "foo.bar.testdns.aws.com", "A")
|
||||||
|
change.add_value("5.6.7.8")
|
||||||
|
changes.commit()
|
||||||
|
|
||||||
|
rrsets = conn.get_all_rrsets(zoneid, type="A")
|
||||||
|
rrsets.should.have.length_of(1)
|
||||||
|
rrsets[0].resource_records[0].should.equal('5.6.7.8')
|
||||||
|
|
||||||
changes = ResourceRecordSets(conn, zoneid)
|
changes = ResourceRecordSets(conn, zoneid)
|
||||||
changes.add_change("DELETE", "foo.bar.testdns.aws.com", "A")
|
changes.add_change("DELETE", "foo.bar.testdns.aws.com", "A")
|
||||||
changes.commit()
|
changes.commit()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue