Hello,

I was going to try my hand at attempting a patch for ipa-tests. However in
wanting to test my patch, I am not sure how to run ipa-tests to check if it
works or not. Documentation is not really clear on what needs to be done to
start a test and run a test. This is for
https://fedorahosted.org/freeipa/ticket/4029

I have attached the patch that I have yet to really test with ipa-test. Any
help on how to test the patch running ipa-tests would be great. Of course,
if one of the reviewers looks at the patch and looks good, then I would be
happy with that as well.

Thanks,

Gabe
From e049c030ef1320332bfc2d67cf026efe8ad91fa6 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Tue, 2 Dec 2014 20:57:11 -0700
Subject: [PATCH] Add test case for unsupported argument for ipa-advise

https://fedorahosted.org/freeipa/ticket/4029
---
 ipatests/test_integration/test_legacy_clients.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ipatests/test_integration/test_legacy_clients.py b/ipatests/test_integration/test_legacy_clients.py
index 49ad2801927bfffd36bd80e400173d5b86b3b856..cc40e9eaa7b06bc7ce756ba1c25f21482d3937b7 100644
--- a/ipatests/test_integration/test_legacy_clients.py
+++ b/ipatests/test_integration/test_legacy_clients.py
@@ -71,6 +71,13 @@ class BaseTestLegacyClient(object):
         # Restart SSHD to load new PAM configuration
         self.legacy_client.run_command([paths.SBIN_SERVICE, 'sshd', 'restart'])
 
+    def test_invalid_advice(self):
+        result = self.master.run_command(['ipa-advise', 'config-invalid-param'])
+        invalid_advice_regex = "invalid[\s]+\'advice\'.*"
+
+        assert re.search(invalid_advice_regex, result.stdout_text)
+
+
     def clear_sssd_caches(self):
         tasks.clear_sssd_cache(self.master)
         tasks.clear_sssd_cache(self.legacy_client)
-- 
2.0.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to