Add tests for wildcard RRSets
Port tests for wildcard recordsets from old functional tests Change-Id: I587aced635f869ef828b31e35095a019154abf3b
This commit is contained in:
parent
62f9d490f8
commit
46e27d3926
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
"A at APEX": {
|
||||||
|
"name": "*",
|
||||||
|
"type": "A",
|
||||||
|
"records": ["192.0.2.1", "192.0.2.2", "192.0.2.3"]
|
||||||
|
},
|
||||||
|
"A under APEX": {
|
||||||
|
"name": "*.sub",
|
||||||
|
"type": "A",
|
||||||
|
"records": ["192.0.2.1", "192.0.2.2", "192.0.2.3"]
|
||||||
|
},
|
||||||
|
"AAAA at APEX": {
|
||||||
|
"name": "*",
|
||||||
|
"type": "AAAA",
|
||||||
|
"records": ["2001:db8::1", "2001:db8::1", "2001:db8::"]
|
||||||
|
},
|
||||||
|
"AAAA under APEX": {
|
||||||
|
"name": "*.sub",
|
||||||
|
"type": "AAAA",
|
||||||
|
"records": ["2001:db8::1", "2001:db8::1", "2001:db8::"]
|
||||||
|
},
|
||||||
|
"MX at APEX": {
|
||||||
|
"name": "*",
|
||||||
|
"type": "MX",
|
||||||
|
"records": ["10 mail1.example.org.",
|
||||||
|
"20 mail2.example.org."]
|
||||||
|
},
|
||||||
|
"MX under APEX": {
|
||||||
|
"name": "*.sub",
|
||||||
|
"type": "MX",
|
||||||
|
"records": ["10 mail.example.org."]
|
||||||
|
},
|
||||||
|
"SPF at APEX": {
|
||||||
|
"name": "*",
|
||||||
|
"type": "SPF",
|
||||||
|
"records": ["v=spf1; a -all"]
|
||||||
|
},
|
||||||
|
"SPF under APEX": {
|
||||||
|
"name": "*.sub",
|
||||||
|
"type": "SPF",
|
||||||
|
"records": ["v=spf1; a -all"]
|
||||||
|
},
|
||||||
|
"TXT at APEX": {
|
||||||
|
"name": "*",
|
||||||
|
"type": "TXT",
|
||||||
|
"records": ["Can you read me?"]
|
||||||
|
},
|
||||||
|
"TXT under APEX": {
|
||||||
|
"name": "*.sub",
|
||||||
|
"type": "TXT",
|
||||||
|
"records": ["Can you read me?"]
|
||||||
|
}
|
||||||
|
}
|
|
@ -91,6 +91,28 @@ class RecordsetsTest(BaseRecordsetsTest):
|
||||||
LOG.info('Ensure we respond with PENDING')
|
LOG.info('Ensure we respond with PENDING')
|
||||||
self.assertEqual('PENDING', body['status'])
|
self.assertEqual('PENDING', body['status'])
|
||||||
|
|
||||||
|
@decorators.idempotent_id('69f002e5-6511-43d3-abae-7abdd45ae03e')
|
||||||
|
@ddt.file_data("recordset_wildcard_data.json")
|
||||||
|
def test_create_wildcard_recordset(self, name, type, records):
|
||||||
|
if name is not None:
|
||||||
|
recordset_name = name + "." + self.zone['name']
|
||||||
|
|
||||||
|
else:
|
||||||
|
recordset_name = "*." + self.zone['name']
|
||||||
|
|
||||||
|
recordset_data = {
|
||||||
|
'name': recordset_name,
|
||||||
|
'type': type,
|
||||||
|
'records': records,
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG.info('Create a Recordset')
|
||||||
|
resp, body = self.client.create_recordset(
|
||||||
|
self.zone['id'], recordset_data)
|
||||||
|
|
||||||
|
LOG.info('Ensure we respond with PENDING')
|
||||||
|
self.assertEqual('PENDING', body['status'])
|
||||||
|
|
||||||
@decorators.idempotent_id('5964f730-5546-46e6-9105-5030e9c492b2')
|
@decorators.idempotent_id('5964f730-5546-46e6-9105-5030e9c492b2')
|
||||||
def test_list_recordsets(self):
|
def test_list_recordsets(self):
|
||||||
recordset_data = data_utils.rand_recordset_data(
|
recordset_data = data_utils.rand_recordset_data(
|
||||||
|
|
Loading…
Reference in New Issue