mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
tests: vault_plugin: Skip tests if KRA not available
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
Test the `ipalib/plugins/vault.py` module.
|
Test the `ipalib/plugins/vault.py` module.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import nose
|
||||||
from ipalib import api, errors
|
from ipalib import api, errors
|
||||||
from xmlrpc_test import Declarative, fuzzy_string
|
from xmlrpc_test import Declarative, fuzzy_string
|
||||||
|
|
||||||
@@ -82,6 +83,16 @@ kUlCMj24a8XsShzYTWBIyW2ngvGe3pQ9PfjkUdm0LGZjYITCBvgOKw==
|
|||||||
|
|
||||||
class test_vault_plugin(Declarative):
|
class test_vault_plugin(Declarative):
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def setup_class(cls):
|
||||||
|
if not api.Backend.rpcclient.isconnected():
|
||||||
|
api.Backend.rpcclient.connect(fallback=False)
|
||||||
|
|
||||||
|
if not api.Command.kra_is_enabled()['result']:
|
||||||
|
raise nose.SkipTest('KRA service is not enabled')
|
||||||
|
|
||||||
|
super(test_vault_plugin, cls).setup_class()
|
||||||
|
|
||||||
cleanup_commands = [
|
cleanup_commands = [
|
||||||
('vault_del', [vault_name], {'continue': True}),
|
('vault_del', [vault_name], {'continue': True}),
|
||||||
('vault_del', [vault_name], {
|
('vault_del', [vault_name], {
|
||||||
|
|||||||
Reference in New Issue
Block a user