URL: https://github.com/freeipa/freeipa/pull/2129 Author: tiran Title: #2129: Turn multihost config problems into errors Action: opened
PR body: """ The pytest multihost plugin skips tests, when there is a problem with a test configuration. Configuration bugs like missing resources are not considered a problem. The IPA mh fixture now catches the skip exception and turns it into a fatal error. Signed-off-by: Christian Heimes <chei...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/2129/head:pr2129 git checkout pr2129
From d1f656ac254e232f6edc805935617ecf50a78de3 Mon Sep 17 00:00:00 2001 From: Christian Heimes <chei...@redhat.com> Date: Tue, 10 Jul 2018 14:18:25 +0200 Subject: [PATCH] Turn multihost config problems into errors The pytest multihost plugin skips tests, when there is a problem with a test configuration. Configuration bugs like missing resources are not considered a problem. The IPA mh fixture now catches the skip exception and turns it into a fatal error. Signed-off-by: Christian Heimes <chei...@redhat.com> --- ipatests/pytest_plugins/integration/__init__.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ipatests/pytest_plugins/integration/__init__.py b/ipatests/pytest_plugins/integration/__init__.py index 7c1eb2232e..015d7b0b42 100644 --- a/ipatests/pytest_plugins/integration/__init__.py +++ b/ipatests/pytest_plugins/integration/__init__.py @@ -225,12 +225,15 @@ def mh(request, class_integration_logs): } }) - mh = make_multihost_fixture( - request, - domain_descriptions, - config_class=Config, - _config=get_global_config(), - ) + try: + mh = make_multihost_fixture( + request, + domain_descriptions, + config_class=Config, + _config=get_global_config(), + ) + except pytest.skip.Exception as e: + pytest.fail(str(e)) mh.domain = mh.config.domains[0] [mh.master] = mh.domain.hosts_by_role('master')
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/freeipa-devel@lists.fedorahosted.org/message/EFOHB2KSNIPE4JMZQUEWGOS5A75ER35X/