From 25495d1e40129cf6ae69c1bc8cb8a595265812a7 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <twoerner@redhat.com>
Date: Thu, 4 Apr 2019 14:51:54 +0200
Subject: [PATCH] ipaserver_test: Do not show traceback in case of testing
 failures

ipaserver_test was not handling possible exceptions in the tests which
resulted in a traceback. This has been fixed.
---
 roles/ipaserver/library/ipaserver_test.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/roles/ipaserver/library/ipaserver_test.py b/roles/ipaserver/library/ipaserver_test.py
index 880e641d..81719885 100644
--- a/roles/ipaserver/library/ipaserver_test.py
+++ b/roles/ipaserver/library/ipaserver_test.py
@@ -727,6 +727,9 @@ def main():
         if options.setup_adtrust:
             adtrust.install_check(False, options, api)
 
+    except (RuntimeError, ValueError, ScriptError) as e:
+        module.fail_json(msg=str(e))
+
     finally:
         try:
             shutil.rmtree(ipa_tempdir, ignore_errors=True)
-- 
GitLab