summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-10-13 13:38:29 +0200
committerMartin Basti <mbasti@redhat.com>2015-10-15 18:37:52 +0200
commit5233165ce7062bb7aa649bf95a029103c375207b (patch)
tree67881bef36f463e3529e3240e9ce352eb6278ee9
parentae23432ef520850de820aff099679f3f639d1d2f (diff)
downloadfreeipa-5233165ce7062bb7aa649bf95a029103c375207b.tar.gz
freeipa-5233165ce7062bb7aa649bf95a029103c375207b.tar.xz
freeipa-5233165ce7062bb7aa649bf95a029103c375207b.zip
CI: installation with customized DS config
Test covers: https://fedorahosted.org/freeipa/ticket/4949 https://fedorahosted.org/freeipa/ticket/4048 https://fedorahosted.org/freeipa/ticket/1930 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
-rw-r--r--ipatests/test_integration/tasks.py16
-rw-r--r--ipatests/test_integration/test_customized_ds_config_install.py94
2 files changed, 105 insertions, 5 deletions
diff --git a/ipatests/test_integration/tasks.py b/ipatests/test_integration/tasks.py
index 918f78cde..e241454a9 100644
--- a/ipatests/test_integration/tasks.py
+++ b/ipatests/test_integration/tasks.py
@@ -288,11 +288,7 @@ def get_replica_filename(replica):
return os.path.join(replica.config.test_dir, 'replica-info.gpg')
-def install_replica(master, replica, setup_ca=True, setup_dns=False,
- setup_kra=False):
- replica.collect_log(paths.IPAREPLICA_INSTALL_LOG)
- replica.collect_log(paths.IPAREPLICA_CONNCHECK_LOG)
-
+def replica_prepare(master, replica):
apply_common_fixes(replica)
fix_apache_semaphores(replica)
prepare_reverse_zone(master, replica.ip)
@@ -304,6 +300,16 @@ def install_replica(master, replica, setup_ca=True, setup_dns=False,
paths.REPLICA_INFO_GPG_TEMPLATE % replica.hostname)
replica_filename = get_replica_filename(replica)
replica.put_file_contents(replica_filename, replica_bundle)
+
+
+def install_replica(master, replica, setup_ca=True, setup_dns=False,
+ setup_kra=False):
+ replica.collect_log(paths.IPAREPLICA_INSTALL_LOG)
+ replica.collect_log(paths.IPAREPLICA_CONNCHECK_LOG)
+
+ replica_prepare(master, replica)
+
+ replica_filename = get_replica_filename(replica)
args = ['ipa-replica-install', '-U',
'-p', replica.config.dirman_password,
'-w', replica.config.admin_password,
diff --git a/ipatests/test_integration/test_customized_ds_config_install.py b/ipatests/test_integration/test_customized_ds_config_install.py
new file mode 100644
index 000000000..d55f6b9c8
--- /dev/null
+++ b/ipatests/test_integration/test_customized_ds_config_install.py
@@ -0,0 +1,94 @@
+
+from ipatests.test_integration.base import IntegrationTest
+from ipatests.test_integration import tasks
+
+DIRSRV_CONFIG_MODS = """
+# https://fedorahosted.org/freeipa/ticket/4949
+dn: cn=config,cn=ldbm database,cn=plugins,cn=config
+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"
+
+
+class TestCustomInstallMaster(IntegrationTest):
+ """
+ Install master with customized DS config
+ """
+ topology = 'star'
+
+ @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)
+
+ def test_customized_ds_install_master(self):
+ args = [
+ 'ipa-server-install', '-U',
+ '-r', self.master.domain.name,
+ '-p', self.master.config.dirman_password,
+ '-a', self.master.config.admin_password,
+ '--dirsrv-config-mods', CONFIG_LDIF_PATH,
+ ]
+ self.master.run_command(args)
+
+
+class TestCustomInstallReplica(IntegrationTest):
+ """
+ Install replica with customized DS config
+ """
+ topology = 'star'
+ num_replicas = 1
+
+ @classmethod
+ def install(cls, mh):
+ # just prepare LDIF file on both master and replica
+ cls.replicas[0].put_file_contents(CONFIG_LDIF_PATH, DIRSRV_CONFIG_MODS)
+ tasks.install_master(cls.master)
+
+ def test_customized_ds_install_replica(self):
+ tasks.replica_prepare(self.master, self.replicas[0])
+ replica_filename = tasks.get_replica_filename(self.replicas[0])
+ args = ['ipa-replica-install', '-U',
+ '-p', self.replicas[0].config.dirman_password,
+ '-w', self.replicas[0].config.admin_password,
+ '--ip-address', self.replicas[0].ip,
+ '--dirsrv-config-mods', CONFIG_LDIF_PATH,
+ replica_filename]
+ self.replicas[0].run_command(args)