summaryrefslogtreecommitdiffstats
path: root/ipatests
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-12-02 09:10:41 +0100
committerJan Cholasta <jcholast@redhat.com>2017-02-22 08:07:48 +0000
commitfe6f2b6f6effcf9f3c58e1e3f6d0874609c10c25 (patch)
treefaf107dfdb15e1eb26667620f8b0faaaf84500e2 /ipatests
parentcf25ea7e300cdada57bd964acb4393cc11ad333e (diff)
downloadfreeipa-fe6f2b6f6effcf9f3c58e1e3f6d0874609c10c25.tar.gz
freeipa-fe6f2b6f6effcf9f3c58e1e3f6d0874609c10c25.tar.xz
freeipa-fe6f2b6f6effcf9f3c58e1e3f6d0874609c10c25.zip
scripts, tests: explicitly set confdir in the rest of server code
Commit 1e6a204b4372bbbfb722a00370a5ce4e34406b9f added explicit confdir setting to api.bootstrap() calls of a randomly selected portion of server-side scripts and tests. This commit adds it to the rest of server-side code for consistency. https://fedorahosted.org/freeipa/ticket/6389 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipatests')
-rw-r--r--ipatests/test_ipaserver/test_ldap.py3
-rw-r--r--ipatests/test_ipaserver/test_serverroles.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/ipatests/test_ipaserver/test_ldap.py b/ipatests/test_ipaserver/test_ldap.py
index 13604dbf0..3a0b4b2ec 100644
--- a/ipatests/test_ipaserver/test_ldap.py
+++ b/ipatests/test_ipaserver/test_ldap.py
@@ -34,6 +34,7 @@ from nose.tools import assert_raises # pylint: disable=E0611
import nss.nss as nss
import six
+from ipaplatform.paths import paths
from ipaserver.plugins.ldap2 import ldap2
from ipalib import api, x509, create_api, errors
from ipapython import ipautil
@@ -111,7 +112,7 @@ class test_ldap(object):
# a client-only api. Then we register in the commands and objects
# we need for the test.
myapi = create_api(mode=None)
- myapi.bootstrap(context='cli', in_server=True)
+ myapi.bootstrap(context='cli', in_server=True, confdir=paths.ETC_IPA)
myapi.finalize()
pwfile = api.env.dot_ipa + os.sep + ".dmpw"
diff --git a/ipatests/test_ipaserver/test_serverroles.py b/ipatests/test_ipaserver/test_serverroles.py
index 01181051f..d8844df30 100644
--- a/ipatests/test_ipaserver/test_serverroles.py
+++ b/ipatests/test_ipaserver/test_serverroles.py
@@ -11,6 +11,7 @@ from collections import namedtuple
import ldap
import pytest
+from ipaplatform.paths import paths
from ipalib import api, create_api, errors
from ipapython.dn import DN
from ipatests.util import MockLDAP
@@ -469,7 +470,9 @@ class MockMasterTopology(object):
@pytest.fixture(scope='module')
def mock_api(request):
test_api = create_api(mode=None)
- test_api.bootstrap(in_server=True, ldap_uri=api.env.ldap_uri)
+ test_api.bootstrap(in_server=True,
+ ldap_uri=api.env.ldap_uri,
+ confdir=paths.ETC_IPA)
test_api.finalize()
if not test_api.Backend.ldap2.isconnected():