Skip to content
Snippets Groups Projects
Commit a5306b2d authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

pytests/test_dnszone: Fix evaluation of boolean values

Evaluating boolean values output by FreeIPA must use regular
expressions to handle both "TRUE/FALSE" and "True/False".
parent 8ab3aa06
No related branches found
No related tags found
No related merge requests found
......@@ -64,18 +64,26 @@ class TestDNSZone(AnsibleFreeIPATestCase):
def test_dnszone_disable(self):
"""TC-30: Disable DNS Zone."""
zone26 = "26testzone.test"
self.check_details(["Active zone: TRUE"], "dnszone-find", [zone26])
self.check_details(
["Active zone: (TRUE|True)"], "dnszone-find", [zone26]
)
# Disable dns zone
self.run_playbook(BASE_PATH + "dnszone_disable.yaml")
self.check_details(["Active zone: FALSE"], "dnszone-find", [zone26])
self.check_details(
["Active zone: (FALSE|False)"], "dnszone-find", [zone26]
)
def test_dnszone_enable(self):
"""TC-31: Enable DNS Zone."""
zone26 = "26testzone.test"
self.check_details(["Active zone: FALSE"], "dnszone-find", [zone26])
self.check_details(
["Active zone: (FALSE|False)"], "dnszone-find", [zone26]
)
# Enable dns zone
self.run_playbook(BASE_PATH + "dnszone_enable.yaml")
self.check_details(["Active zone: TRUE"], "dnszone-find", [zone26])
self.check_details(
["Active zone: (TRUE|True)"], "dnszone-find", [zone26]
)
def test_dnszone_name_from_ip(self):
"""TC-35: Add dns zone with reverse zone IP. Bug#1845056."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment