summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2015-07-21 15:43:35 +0200
committerTomas Babej <tbabej@redhat.com>2015-07-22 11:13:06 +0200
commit8eb26e9230e43eb2683778b8d667c6c7e632ec36 (patch)
tree662b8263dda80dd04fcda22b20d9f4fc554e4657
parent083c64eb706a09d936935a94f6a9176c81553617 (diff)
downloadfreeipa-8eb26e9230e43eb2683778b8d667c6c7e632ec36.zip
freeipa-8eb26e9230e43eb2683778b8d667c6c7e632ec36.tar.gz
freeipa-8eb26e9230e43eb2683778b8d667c6c7e632ec36.tar.xz
tests: vault_plugin: Skip tests if KRA not available
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
-rw-r--r--ipatests/test_xmlrpc/test_vault_plugin.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/ipatests/test_xmlrpc/test_vault_plugin.py b/ipatests/test_xmlrpc/test_vault_plugin.py
index fe2f2f6..77c5154 100644
--- a/ipatests/test_xmlrpc/test_vault_plugin.py
+++ b/ipatests/test_xmlrpc/test_vault_plugin.py
@@ -21,6 +21,7 @@
Test the `ipalib/plugins/vault.py` module.
"""
+import nose
from ipalib import api, errors
from xmlrpc_test import Declarative, fuzzy_string
@@ -82,6 +83,16 @@ kUlCMj24a8XsShzYTWBIyW2ngvGe3pQ9PfjkUdm0LGZjYITCBvgOKw==
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 = [
('vault_del', [vault_name], {'continue': True}),
('vault_del', [vault_name], {