From 0584caf56a33232b15c53ea5d6371bb43c3903aa Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Thu, 15 Aug 2013 17:56:17 +0200 Subject: Web UI Integration tests: Kerberos Flags Tests according to: http://www.freeipa.org/page/V3/Kerberos_Flags https://fedorahosted.org/freeipa/ticket/3831 --- ipatests/test_webui/test_host.py | 21 +++++++++++++++++++++ ipatests/test_webui/test_service.py | 31 ++++++++++++++++++++++++++++--- 2 files changed, 49 insertions(+), 3 deletions(-) (limited to 'ipatests') diff --git a/ipatests/test_webui/test_host.py b/ipatests/test_webui/test_host.py index 806f2b104..cb697c5e0 100644 --- a/ipatests/test_webui/test_host.py +++ b/ipatests/test_webui/test_host.py @@ -198,6 +198,27 @@ class test_host(host_tasks): self.navigate_by_breadcrumb('Hosts') self.delete_record(self.pkey, self.data.get('del')) + def test_kerberos_flags(self): + """ + Test Kerberos flags + http://www.freeipa.org/page/V3/Kerberos_Flags + """ + pkey = self.config.get('ipa_server') + name = 'ipakrbokasdelegate' + mod = {'mod': [('checkbox', name, '')]} + checked = ['checked'] + + self.init_app() + self.navigate_to_record(pkey, entity=ENTITY) + + if self.get_field_checked(name) == checked: + self.mod_record(ENTITY, mod) # uncheck + + self.mod_record(ENTITY, mod) + self.validate_fields([('checkbox', name, checked)]) + self.mod_record(ENTITY, mod) + self.validate_fields([('checkbox', name, [])]) + def test_associations(self): """ Host direct associations diff --git a/ipatests/test_webui/test_service.py b/ipatests/test_webui/test_service.py index fc64c6db5..d2e7ad772 100644 --- a/ipatests/test_webui/test_service.py +++ b/ipatests/test_webui/test_service.py @@ -51,6 +51,12 @@ class sevice_tasks(UI_driver): csr = csr_file.read() return csr + def get_http_pkey(self): + host = self.config.get('ipa_server') + realm = self.config.get('ipa_realm') + pkey = 'HTTP/%s@%s' % (host, realm) + return pkey + class test_service(sevice_tasks): @@ -158,10 +164,29 @@ class test_service(sevice_tasks): # test HTTP, which should have cert set by default and so 'view' and 'get' # actions visible and enabled - host = self.config.get('ipa_server') - realm = self.config.get('ipa_realm') - pkey = 'HTTP/%s@%s' % (host, realm) + pkey = self.get_http_pkey() self.navigate_to_record(pkey) self.assert_action_panel_action(panel, 'view_cert') self.assert_action_panel_action(panel, 'get_cert') + + def test_kerberos_flags(self): + """ + Test Kerberos flags + http://www.freeipa.org/page/V3/Kerberos_Flags + """ + pkey = self.get_http_pkey() + name = 'ipakrbokasdelegate' + mod = {'mod': [('checkbox', name, '')]} + checked = ['checked'] + + self.init_app() + self.navigate_to_record(pkey, entity=ENTITY) + + if self.get_field_checked(name) == checked: + self.mod_record(ENTITY, mod) # uncheck + + self.mod_record(ENTITY, mod) + self.validate_fields([('checkbox', name, checked)]) + self.mod_record(ENTITY, mod) + self.validate_fields([('checkbox', name, [])]) -- cgit