Fix issue with 'priority' value in pool_ns_record

- 'priority' must be equal or higher minimal value [1]

[1] https://github.com/openstack/designate/blob/master/designate/objects/pool_ns_record.py#L32

Change-Id: Ib20c62e49e15814ba904de05bc2709ee47190a12
This commit is contained in:
Nguyen Van Trung 2017-06-05 17:23:53 +07:00
parent 014756c520
commit 96a5691ca2
2 changed files with 4 additions and 4 deletions

View File

@ -422,7 +422,7 @@ class TestCase(base.BaseTestCase):
# Fill out the necessary pool details
pool.ns_records = objects.PoolNsRecordList.from_list([
{'hostname': 'ns1.example.org.', 'priority': 0}
{'hostname': 'ns1.example.org.', 'priority': 1}
])
pool.targets = objects.PoolTargetList.from_list([

View File

@ -130,7 +130,7 @@ class ApiV1ServersTest(ApiV1Test):
# Add a new NS record to the pool
pool.ns_records.append(
objects.PoolNsRecord(priority=0, hostname='new-ns1.example.org.'))
objects.PoolNsRecord(priority=1, hostname='new-ns1.example.org.'))
# Save the pool to add a new nameserver
self.storage.update_pool(self.admin_context, pool)
@ -143,7 +143,7 @@ class ApiV1ServersTest(ApiV1Test):
# Add a new NS record to the pool
pool.ns_records.append(
objects.PoolNsRecord(priority=0, hostname='new-ns2.example.org.'))
objects.PoolNsRecord(priority=1, hostname='new-ns2.example.org.'))
# Save the pool to add a new nameserver
self.storage.update_pool(self.admin_context, pool)
@ -221,7 +221,7 @@ class ApiV1ServersTest(ApiV1Test):
# because the last remaining server is not allowed to be deleted
# Add a new NS record to the pool
pool.ns_records.append(
objects.PoolNsRecord(priority=0, hostname='new-ns2.example.org.'))
objects.PoolNsRecord(priority=1, hostname='new-ns2.example.org.'))
# Save the pool to add a new nameserver
self.storage.update_pool(self.admin_context, pool)