diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-08-15 17:56:17 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-08-22 15:23:56 +0200 |
commit | 0584caf56a33232b15c53ea5d6371bb43c3903aa (patch) | |
tree | 42e480622048834e1a320ea25da4dca4a836ed58 /ipatests | |
parent | 8e8afe0519c1d47994e155a3c72b2bdc934a9695 (diff) | |
download | freeipa-0584caf56a33232b15c53ea5d6371bb43c3903aa.tar.gz freeipa-0584caf56a33232b15c53ea5d6371bb43c3903aa.tar.xz freeipa-0584caf56a33232b15c53ea5d6371bb43c3903aa.zip |
Web UI Integration tests: Kerberos Flags
Tests according to: http://www.freeipa.org/page/V3/Kerberos_Flags
https://fedorahosted.org/freeipa/ticket/3831
Diffstat (limited to 'ipatests')
-rw-r--r-- | ipatests/test_webui/test_host.py | 21 | ||||
-rw-r--r-- | ipatests/test_webui/test_service.py | 31 |
2 files changed, 49 insertions, 3 deletions
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, [])]) |