Re: [Freeipa-devel] [PATCH 0347] tests: vault_plugin: Skip tests if KRA not available

2015-07-22 Thread Martin Babinsky

On 07/21/2015 06:03 PM, Tomas Babej wrote:

Hi,

the vault tests should be skipped in case the KRA is not available on
the machine.

Tomas




ACK

--
Martin^3 Babinsky

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


Re: [Freeipa-devel] [PATCH 0347] tests: vault_plugin: Skip tests if KRA not available

2015-07-22 Thread Tomas Babej


On 07/22/2015 08:41 AM, Martin Babinsky wrote:
 On 07/21/2015 06:03 PM, Tomas Babej wrote:
 Hi,

 the vault tests should be skipped in case the KRA is not available on
 the machine.

 Tomas



 ACK
 

Pushed to:
master: 8eb26e9230e43eb2683778b8d667c6c7e632ec36
ipa-4-2: dafab2ab3b4fa4a88d59557e29ee266b8b956ede

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code


[Freeipa-devel] [PATCH 0347] tests: vault_plugin: Skip tests if KRA not available

2015-07-21 Thread Tomas Babej
Hi,

the vault tests should be skipped in case the KRA is not available on
the machine.

Tomas
From dcfc274d400b5cd4bb2bdba6f1774952c63f9a5b Mon Sep 17 00:00:00 2001
From: Tomas Babej tba...@redhat.com
Date: Tue, 21 Jul 2015 15:43:35 +0200
Subject: [PATCH] tests: vault_plugin: Skip tests if KRA not available

---
 ipatests/test_xmlrpc/test_vault_plugin.py | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/ipatests/test_xmlrpc/test_vault_plugin.py b/ipatests/test_xmlrpc/test_vault_plugin.py
index fe2f2f67d664e0640fdda99fd3e2f068ee61cb01..77c5154137bf440b38f4da225545c6aef5faabb6 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], {
-- 
2.1.0

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code