Fix checking of the [dns].nameservers value
This patch [1] introduced checking whether the CONF.dns.nameservers
is empty. If the CONF.dns.nameservers value is empty then the
initialization of the QueryClient fails. This change makes the majority
of designate-tempest-plugin tests fail even tests that do not use the
QueryClient.
This patch introduces three changes:
1) ValueError is raised only when the query() function is called so
that only tests that actually use the query() function fail.
2) wait_for_query() function is fixed so that it never succeeds when the
CONF.dns.nameservers value is empty.
3) Skip tests that rely upon [dns].nameserver value.
[1] https://review.opendev.org/c/openstack/designate-tempest-plugin/+/860116
Change-Id: Iedd151b2e47ed62adc168a97cb6021ccb47abb0f
diff --git a/designate_tempest_plugin/common/waiters.py b/designate_tempest_plugin/common/waiters.py
index affe332..cfa2d10 100644
--- a/designate_tempest_plugin/common/waiters.py
+++ b/designate_tempest_plugin/common/waiters.py
@@ -233,7 +233,7 @@
else:
all_answers_good = all(not r.answer for r in responses)
- if not client.nameservers or all_answers_good:
+ if all_answers_good:
LOG.info("Record %s of type %s was successfully %s on nameservers "
"%s", name, rdatatype, state, client.nameservers)
return