summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-06-19 16:26:23 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-06-27 14:18:34 +0200
commitc7c13965e3604ea3f51684875ba252cc2d8bfbf1 (patch)
tree83410223183d3706f49feb307c09213d8ef6f14b /ipatests
parent7a25168a3ceb8677a01b3bce6d2c10ac52d4d584 (diff)
downloadfreeipa-c7c13965e3604ea3f51684875ba252cc2d8bfbf1.tar.gz
freeipa-c7c13965e3604ea3f51684875ba252cc2d8bfbf1.tar.xz
freeipa-c7c13965e3604ea3f51684875ba252cc2d8bfbf1.zip
webui-ci: dns forward zone tests
Selenium CI sanity tests for DNS Forward Zones https://fedorahosted.org/freeipa/ticket/4357 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_webui/test_dns.py41
-rw-r--r--ipatests/test_webui/test_navigation.py2
2 files changed, 43 insertions, 0 deletions
diff --git a/ipatests/test_webui/test_dns.py b/ipatests/test_webui/test_dns.py
index 62f6040a7..ffbd0ab2b 100644
--- a/ipatests/test_webui/test_dns.py
+++ b/ipatests/test_webui/test_dns.py
@@ -25,6 +25,7 @@ from ipatests.test_webui.ui_driver import UI_driver
from ipatests.test_webui.ui_driver import screenshot
ZONE_ENTITY = 'dnszone'
+FORWARD_ZONE_ENTITY = 'dnsforwardzone'
RECORD_ENTITY = 'dnsrecord'
CONFIG_ENTITY = 'dnsconfig'
@@ -45,6 +46,24 @@ ZONE_DATA = {
],
}
+FORWARD_ZONE_PKEY = 'forward.itest.'
+
+FORWARD_ZONE_DATA = {
+ 'pkey': FORWARD_ZONE_PKEY,
+ 'add': [
+ ('textbox', 'idnsname', FORWARD_ZONE_PKEY),
+ ('multivalued', 'idnsforwarders', [
+ ('add', '192.168.2.1'),
+ ]),
+ ('radio', 'idnsforwardpolicy', 'only'),
+ ],
+ 'mod': [
+ ('multivalued', 'idnsforwarders', [
+ ('add', '192.168.3.1'),
+ ]),
+ ('checkbox', 'idnsforwardpolicy', 'first'),
+ ],
+}
RECORD_PKEY = 'itest'
A_IP = '192.168.1.10'
@@ -102,6 +121,28 @@ class test_dns(UI_driver):
self.delete_record(ZONE_PKEY)
@screenshot
+ def test_forward_zone(self):
+ """
+ Forward DNS zones
+ """
+ self.init_app()
+
+ # add and mod zone
+ self.basic_crud(FORWARD_ZONE_ENTITY, FORWARD_ZONE_DATA, delete=False)
+
+ # enable/disable
+ self.navigate_to_record(FORWARD_ZONE_PKEY)
+
+ self.disable_action()
+ self.enable_action()
+ self.action_list_action('add_permission')
+ self.action_list_action('remove_permission')
+
+ # del zone
+ self.navigate_by_breadcrumb("DNS Forward Zones")
+ self.delete_record(FORWARD_ZONE_PKEY)
+
+ @screenshot
def test_last_entry_deletion(self):
"""
Test last entry deletion
diff --git a/ipatests/test_webui/test_navigation.py b/ipatests/test_webui/test_navigation.py
index bf2461a53..caf291a90 100644
--- a/ipatests/test_webui/test_navigation.py
+++ b/ipatests/test_webui/test_navigation.py
@@ -33,6 +33,7 @@ ENTITIES = [
'netgroup',
'service',
'dnszone',
+ 'dnsforwardzone',
# TODO: dnsrecord
'dnsconfig',
'cert',
@@ -109,6 +110,7 @@ class test_navigation(UI_driver):
self.navigate_by_menu('identity/dns/dnsconfig', True)
self.navigate_by_menu('identity/dns', False)
self.navigate_by_menu('identity/dns/dnszone', False)
+ self.navigate_by_menu('identity/dns/dnsforwardzone')
else:
self.assert_menu_item('identity/dns', False)
if self.has_ca():