Fix recordset name for update checking
The test_update_records_propagated_to_backends_* tests create a
recordsets with a TTL of 666, wait for creation to complete,
update the TTL for these recordsets to 777, and check whether the
updates were applied.
The test checks whether the new TTL is present in the DNS server
response. However, the tests create a recordsets with their own
name, but use the domain name in the DNS server query.
This patch sets the correct name for the check and starts
comparing TTL values directly from the response.
Related-Prod: PRODX-57822
Change-Id: Ib1919061d16aa4340351dbcb2dd39f8afbaabb28
(cherry picked from commit 6c7a95909eb1d199313f7e72787adfe142bafa67)
diff --git a/designate_tempest_plugin/tests/scenario/v2/test_recordsets.py b/designate_tempest_plugin/tests/scenario/v2/test_recordsets.py
index b93f051..d995305 100644
--- a/designate_tempest_plugin/tests/scenario/v2/test_recordsets.py
+++ b/designate_tempest_plugin/tests/scenario/v2/test_recordsets.py
@@ -246,8 +246,12 @@
while True:
ns_obj = SingleQueryClient(ns, config.CONF.dns.query_timeout)
ns_record = ns_obj.query(
- self.zone['name'], rdatatype=recordset_data['type'])
- if str(updated_ttl) in str(ns_record):
+ recordset_data['name'], rdatatype=recordset_data['type'])
+ rrset = ns_record.get_rrset(ns_record.answer,
+ ns_record.question[0].name,
+ ns_record.question[0].rdclass,
+ ns_record.question[0].rdtype)
+ if rrset and rrset.ttl == updated_ttl:
return
if time.time() - start >= config.CONF.dns.build_timeout:
raise lib_exc.TimeoutException(