Sha256: 02a45cb83bdc8c09b57de7d7549bb15e04509009e6bb2f4f8afef54ff83af50a

Contents?: true

Size: 762 Bytes

Versions: 12

Compression:

Stored size: 762 Bytes

Contents

#! /bin/sh
#-------------------------------------------------------------------
# test script for failover
#
source $TESTLIBS
TESTDIR=testdir
PG_CTL=$PGBIN/pg_ctl
PSQL=$PGBIN/psql

for mode in s r
do
	rm -fr $TESTDIR
	mkdir $TESTDIR
	cd $TESTDIR

# create test environment
	echo -n "creating test environment..."
	sh $PGPOOL_SETUP -m $mode -n 2 --no-stop|| exit 1
	echo "done."

	source ./bashrc.ports

	export PGPORT=$PGPOOL_PORT

	$PSQL -c "show pool_nodes" test

	# trrigger failover
	$PG_CTL -D data1 -m f stop
	wait_for_pgpool_startup
	$PSQL -c "show pool_nodes" test > result

	# check the output of "show pool_nodes".
	cmp result ../expected.$mode > /dev/null 2>&1
	if [ $? != 0 ];then
		./shutdownall
		exit 1
	fi
		
	./shutdownall

	cd ..

done

exit 0

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
prestogres-0.4.8 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.7 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.6 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.5 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.4 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.3 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.2 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.1 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.4.0 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.3.0 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.2.0 pgpool2/test/regression/tests/003.failover/test.sh
prestogres-0.1.0 pgpool2/test/regression/tests/003.failover/test.sh