diff --git a/.travis.yml b/.travis.yml index aad4656..658c33c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ python: env: - SCENARIO=datadir_init - - SCENARIO=replications + - SCENARIO=streaming_replication - SCENARIO=collations - SCENARIO=extensions - SCENARIO=logical_replication diff --git a/scenario_tests/replications/docker-compose.yml b/scenario_tests/streaming_replication/docker-compose.yml similarity index 100% rename from scenario_tests/replications/docker-compose.yml rename to scenario_tests/streaming_replication/docker-compose.yml diff --git a/scenario_tests/replications/test.sh b/scenario_tests/streaming_replication/test.sh similarity index 100% rename from scenario_tests/replications/test.sh rename to scenario_tests/streaming_replication/test.sh diff --git a/scenario_tests/replications/tests/__init__.py b/scenario_tests/streaming_replication/tests/__init__.py similarity index 100% rename from scenario_tests/replications/tests/__init__.py rename to scenario_tests/streaming_replication/tests/__init__.py diff --git a/scenario_tests/replications/tests/test_master.sh b/scenario_tests/streaming_replication/tests/test_master.sh similarity index 100% rename from scenario_tests/replications/tests/test_master.sh rename to scenario_tests/streaming_replication/tests/test_master.sh diff --git a/scenario_tests/replications/tests/test_node.sh b/scenario_tests/streaming_replication/tests/test_node.sh similarity index 100% rename from scenario_tests/replications/tests/test_node.sh rename to scenario_tests/streaming_replication/tests/test_node.sh diff --git a/scenario_tests/replications/tests/test_replication.py b/scenario_tests/streaming_replication/tests/test_replication.py similarity index 100% rename from scenario_tests/replications/tests/test_replication.py rename to scenario_tests/streaming_replication/tests/test_replication.py diff --git a/scripts/setup-conf.sh b/scripts/setup-conf.sh index d22a688..81d5a17 100644 --- a/scripts/setup-conf.sh +++ b/scripts/setup-conf.sh @@ -7,8 +7,6 @@ if [ -f "${SETUP_LOCKFILE}" ]; then return 0 fi -# This script will setup necessary configuration to enable replications - # Refresh configuration in case environment settings changed. cat $CONF.template > $CONF @@ -17,7 +15,7 @@ cat $CONF.template > $CONF sed -i '/data_directory/d' $CONF echo "data_directory = '${DATADIR}'" >> $CONF -# This script will setup necessary configuration to optimise for PostGIS and to enable replications +# Create a config to optimise postgis if [[ -f ${ROOT_CONF}/postgis.conf ]];then rm $CONF/postgis.conf fi @@ -41,10 +39,8 @@ cron.use_background_workers = on EOF echo "include 'postgis.conf'" >> $CONF -# This script will setup necessary replication settings - - +# Create a config for logical replication if [[ "${REPLICATION}" =~ [Tt][Rr][Uu][Ee] && "$WAL_LEVEL" == 'logical' ]]; then if [[ -f ${ROOT_CONF}/logical_replication.conf ]];then rm $CONF/logical_replication.conf @@ -61,6 +57,7 @@ EOF echo "include 'logical_replication.conf'" >> $CONF fi +# Create a config for streaming replication if [[ "${REPLICATION}" =~ [Tt][Rr][Uu][Ee] && "$WAL_LEVEL" == 'replica' ]]; then if [[ -f ${ROOT_CONF}/streaming_replication.conf ]];then rm $CONF/streaming_replication.conf