A functional test to check CNAME recordsets allow only 1 record

Change-Id: Ifa7232d858a20db05cd03e949fbd3c4e891a6afb
This commit is contained in:
Paul Glass 2015-09-18 20:34:50 +00:00
parent 476980e9a1
commit 4097be456b
1 changed files with 11 additions and 0 deletions

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):