mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make fasttest pass without ~/.ipa/default.conf
Some fast tests depend on an api.env with realm, domain, and host. On machines without ~/.ipa/default.conf, the settings are not available. Provide dummy values to make tests pass. Closes: https://pagure.io/freeipa/issue/7432 Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Aleksei Slaikovskii <aslaikov@redhat.com>
This commit is contained in:
parent
d7c23a3ba6
commit
75f7b7b5e6
@ -104,9 +104,14 @@ def pytest_addoption(parser):
|
||||
|
||||
|
||||
def pytest_cmdline_main(config):
|
||||
api.bootstrap(
|
||||
kwargs = dict(
|
||||
context=u'cli', in_server=False, in_tree=True, fallback=False
|
||||
)
|
||||
if not os.path.isfile(os.path.expanduser('~/.ipa/default.conf')):
|
||||
# dummy domain/host for machines without ~/.ipa/default.conf
|
||||
kwargs.update(domain=u'ipa.test', server=u'master.ipa.test')
|
||||
|
||||
api.bootstrap(**kwargs)
|
||||
for klass in cli_plugins:
|
||||
api.add_plugin(klass)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user