From 4cede86673e33bd2e8c9b6dd5eec2ccdb98c3a1a Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 29 Oct 2018 12:11:49 +0100 Subject: [PATCH] Speed up test_customized_ds_config_install Reuse master instance when installing replica with custom DS config. This avoids one extra ipa-server-install and also tests replica installation from a master with custom DS config. See: https://pagure.io/freeipa/issue/7743 Signed-off-by: Christian Heimes Reviewed-By: Florence Blanc-Renaud --- .../test_customized_ds_config_install.py | 32 ++++++------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/ipatests/test_integration/test_customized_ds_config_install.py b/ipatests/test_integration/test_customized_ds_config_install.py index 959849928..a2fcc7dd2 100644 --- a/ipatests/test_integration/test_customized_ds_config_install.py +++ b/ipatests/test_integration/test_customized_ds_config_install.py @@ -47,26 +47,8 @@ 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): - tasks.install_master(self.master, setup_dns=False, extra_args=[ - '--dirsrv-config-file', CONFIG_LDIF_PATH - ]) - - -class TestCustomInstallReplica(IntegrationTest): - """ - Install replica with customized DS config +class TestCustomDSConfigInstall(IntegrationTest): + """Install master and replica with custom DS config """ topology = 'star' num_replicas = 1 @@ -74,8 +56,14 @@ class TestCustomInstallReplica(IntegrationTest): @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) + cls.master.put_file_contents(CONFIG_LDIF_PATH, DIRSRV_CONFIG_MODS) + cls.replicas[0].put_file_contents(CONFIG_LDIF_PATH, + DIRSRV_CONFIG_MODS) + + def test_customized_ds_install_master(self): + tasks.install_master(self.master, setup_dns=False, extra_args=[ + '--dirsrv-config-file', CONFIG_LDIF_PATH + ]) def test_customized_ds_install_replica(self): tasks.install_replica(