Merge "A functional test to check CNAME recordsets allow only 1 record"

This commit is contained in:
Jenkins 2015-09-21 15:42:48 +00:00 committed by Gerrit Code Review
commit 253cd8a88b

View File

@ -182,6 +182,17 @@ class RecordsetTest(DesignateV2Test):
for m in verify_models:
self.assert_dns(m)
def test_cname_recordsets_cannot_have_more_than_one_record(self):
post_model = datagen.random_cname_recordset(zone_name=self.zone.name)
post_model.records = [
"a.{0}".format(self.zone.name),
"b.{0}".format(self.zone.name),
]
client = RecordsetClient.as_user('default')
self.assertRaises(exceptions.BadRequest,
client.post_recordset, self.zone.id, post_model)
class RecordsetOwnershipTest(DesignateV2Test):