mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipatests: do not finalize api when IPA is not configured
Pytest can be executed from a machine that doesn't have IPA configured. In this case, api can't be finalized because values such as basedn are unknown and missing. Fixes https://pagure.io/freeipa/issue/7046 Signed-off-by: Tomas Krizek <tkrizek@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
c565fa1781
commit
7f8d79f637
@ -18,6 +18,7 @@ except ImportError:
|
||||
ipaplatform = None
|
||||
try:
|
||||
import ipaserver
|
||||
from ipaserver.install import installutils
|
||||
except ImportError:
|
||||
ipaserver = None
|
||||
|
||||
@ -105,7 +106,7 @@ def pytest_cmdline_main(config):
|
||||
|
||||
# XXX workaround until https://fedorahosted.org/freeipa/ticket/6408 has
|
||||
# been resolved.
|
||||
if ipaserver is not None:
|
||||
if ipaserver is not None and installutils.is_ipa_configured():
|
||||
api.finalize()
|
||||
|
||||
if config.option.verbose:
|
||||
|
Loading…
Reference in New Issue
Block a user