mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -06:00
tests: certmap: Add test for certmapconfig-{mod,show}
https://pagure.io/freeipa/issue/7105 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
This commit is contained in:
parent
0ccde44501
commit
e574f5d65e
@ -9,7 +9,8 @@ import pytest
|
||||
from ipalib import api, errors
|
||||
from ipapython.dn import DN
|
||||
from ipatests.test_xmlrpc.xmlrpc_test import XMLRPC_test
|
||||
from ipatests.test_xmlrpc.tracker.certmap_plugin import CertmapruleTracker
|
||||
from ipatests.test_xmlrpc.tracker.certmap_plugin import (CertmapruleTracker,
|
||||
CertmapconfigTracker)
|
||||
from ipatests.util import assert_deepequal
|
||||
from ipatests.util import change_principal, unlock_principal_password
|
||||
|
||||
@ -41,6 +42,8 @@ certmaprule_optional_params = (
|
||||
'ipacertmappriority',
|
||||
)
|
||||
|
||||
certmapconfig_update_params = {u'ipacertmappromptusername': u'TRUE'}
|
||||
|
||||
CREATE_PERM = u'System: Add Certmap Rules'
|
||||
READ_PERM = u'System: Read Certmap Rules'
|
||||
UPDATE_PERM = u'System: Modify Certmap Rules'
|
||||
@ -73,6 +76,12 @@ def certmap_rule(request):
|
||||
return tracker.make_fixture(request)
|
||||
|
||||
|
||||
@pytest.fixture(scope='class')
|
||||
def certmap_config(request):
|
||||
tracker = CertmapconfigTracker()
|
||||
return tracker.make_fixture(request)
|
||||
|
||||
|
||||
class TestCRUD(XMLRPC_test):
|
||||
@pytest.mark.parametrize(
|
||||
'dont_fill',
|
||||
@ -124,6 +133,17 @@ class TestEnableDisable(XMLRPC_test):
|
||||
certmap_rule.enable()
|
||||
|
||||
|
||||
class TestConfig(XMLRPC_test):
|
||||
def test_config_mod(self, certmap_config):
|
||||
certmap_config.update(
|
||||
certmapconfig_update_params,
|
||||
{k: [v] for k, v in certmapconfig_update_params.items()}
|
||||
)
|
||||
|
||||
def test_config_show(self, certmap_config):
|
||||
certmap_config.retrieve()
|
||||
|
||||
|
||||
class EWE(object):
|
||||
"""
|
||||
Context manager that checks the outcome of wrapped statement executed
|
||||
|
Loading…
Reference in New Issue
Block a user