2015-10-13 06:38:29 -05:00
|
|
|
|
|
|
|
from ipatests.test_integration.base import IntegrationTest
|
2018-08-02 06:45:19 -05:00
|
|
|
from ipatests.pytest_ipa.integration import tasks
|
2015-10-13 06:38:29 -05:00
|
|
|
|
|
|
|
DIRSRV_CONFIG_MODS = """
|
|
|
|
# https://fedorahosted.org/freeipa/ticket/4949
|
2020-09-24 05:32:37 -05:00
|
|
|
# https://pagure.io/freeipa/issue/8515
|
|
|
|
dn: cn=bdb,cn=config,cn=ldbm database,cn=plugins,cn=config
|
2015-10-13 06:38:29 -05:00
|
|
|
changetype: modify
|
|
|
|
replace: nsslapd-db-locks
|
|
|
|
nsslapd-db-locks: 100000
|
|
|
|
|
|
|
|
# https://fedorahosted.org/freeipa/ticket/1930
|
|
|
|
dn: cn=config
|
|
|
|
changetype: modify
|
|
|
|
replace: nsslapd-allow-unauthenticated-binds
|
|
|
|
nsslapd-allow-unauthenticated-binds: off
|
|
|
|
-
|
|
|
|
replace: nsslapd-require-secure-binds
|
|
|
|
nsslapd-require-secure-binds: off
|
|
|
|
-
|
|
|
|
replace: nsslapd-allow-anonymous-access
|
|
|
|
nsslapd-allow-anonymous-access: off
|
|
|
|
-
|
|
|
|
replace: nsslapd-minssf
|
|
|
|
nsslapd-minssf: 0
|
|
|
|
|
|
|
|
# https://fedorahosted.org/freeipa/ticket/4048
|
|
|
|
dn: cn=config
|
|
|
|
changetype: modify
|
|
|
|
replace: nssslapd-maxbersize
|
|
|
|
nssslapd-maxbersize: 209715201
|
|
|
|
|
|
|
|
dn: cn=userRoot,cn=ldbm database,cn=plugins,cn=config
|
|
|
|
changetype: modify
|
|
|
|
replace: nsslapd-cachememsize
|
|
|
|
nsslapd-cachememsize: 10485761
|
|
|
|
|
|
|
|
dn: cn=config,cn=ldbm database,cn=plugins,cn=config
|
|
|
|
changetype: modify
|
|
|
|
replace: nsslapd-import_cachesize
|
|
|
|
nsslapd-import_cachesize: 20000001
|
|
|
|
-
|
|
|
|
replace: nsslapd-dbcachesize
|
|
|
|
nsslapd-dbcachesize: 10000001
|
|
|
|
"""
|
|
|
|
|
|
|
|
CONFIG_LDIF_PATH = "/root/dirsrv-config-mod.ldif"
|
|
|
|
|
|
|
|
|
2018-10-29 06:11:49 -05:00
|
|
|
class TestCustomDSConfigInstall(IntegrationTest):
|
|
|
|
"""Install master and replica with custom DS config
|
2015-10-13 06:38:29 -05:00
|
|
|
"""
|
|
|
|
topology = 'star'
|
2018-10-29 06:11:49 -05:00
|
|
|
num_replicas = 1
|
2015-10-13 06:38:29 -05:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def install(cls, mh):
|
|
|
|
# just prepare LDIF file on both master and replica
|
|
|
|
cls.master.put_file_contents(CONFIG_LDIF_PATH, DIRSRV_CONFIG_MODS)
|
2018-10-29 06:11:49 -05:00
|
|
|
cls.replicas[0].put_file_contents(CONFIG_LDIF_PATH,
|
|
|
|
DIRSRV_CONFIG_MODS)
|
2015-10-13 06:38:29 -05:00
|
|
|
|
|
|
|
def test_customized_ds_install_master(self):
|
2016-02-24 10:45:55 -06:00
|
|
|
tasks.install_master(self.master, setup_dns=False, extra_args=[
|
|
|
|
'--dirsrv-config-file', CONFIG_LDIF_PATH
|
|
|
|
])
|
2015-10-13 06:38:29 -05:00
|
|
|
|
|
|
|
def test_customized_ds_install_replica(self):
|
2016-02-24 10:45:55 -06:00
|
|
|
tasks.install_replica(
|
|
|
|
self.master, self.replicas[0], setup_ca=False,
|
|
|
|
extra_args=['--dirsrv-config-file', CONFIG_LDIF_PATH])
|