mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Web UI tests: Get rid of *_cert_path and *_csr_path config variables
Web UI tests now don't require additional configuration to test certificates. Self-signed certificates and CSR are generated on fly. Next variables from ~/.ipa/ui_test.conf for now are deprecated: - arbitrary_cert_path - service_csr_path - user_csr_path Ticket: https://pagure.io/freeipa/issue/7843 Reviewed-By: Sergey Orlov <sorlov@redhat.com>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
User tests
|
||||
"""
|
||||
|
||||
from ipatests.test_webui.crypto_utils import generate_csr
|
||||
from ipatests.test_webui.ui_driver import UI_driver
|
||||
from ipatests.test_webui.ui_driver import screenshot
|
||||
import ipatests.test_webui.data_user as user
|
||||
@@ -220,20 +221,13 @@ class test_user(user_tasks):
|
||||
"""
|
||||
Test user certificate actions
|
||||
|
||||
Requires to have CA installed and 'user_csr_path' configuration option
|
||||
set.
|
||||
Requires to have CA installed.
|
||||
"""
|
||||
|
||||
if not self.has_ca():
|
||||
self.skip('CA is not configured')
|
||||
|
||||
csr_path = self.config.get('user_csr_path')
|
||||
if not csr_path:
|
||||
self.skip('CSR file is not configured')
|
||||
|
||||
self.init_app()
|
||||
# ENHANCEMENT: generate csr dynamically
|
||||
csr = self.load_file(csr_path)
|
||||
cert_widget_sel = "div.certificate-widget"
|
||||
|
||||
self.add_record(user.ENTITY, user.DATA)
|
||||
@@ -242,6 +236,8 @@ class test_user(user_tasks):
|
||||
self.navigate_to_record(user.PKEY)
|
||||
|
||||
# cert request
|
||||
csr = generate_csr(user.PKEY, False)
|
||||
|
||||
self.action_list_action('request_cert', confirm=False)
|
||||
self.wait(seconds=2)
|
||||
self.assert_dialog()
|
||||
|
||||
Reference in New Issue
Block a user