test.sh: force /tmp as unix socket dir
authorMarko Kreen <markokr@gmail.com>
Tue, 29 May 2012 20:11:10 +0000 (23:11 +0300)
committerMarko Kreen <markokr@gmail.com>
Tue, 29 May 2012 20:12:12 +0000 (23:12 +0300)
This allows to surive pgsql that defaults somewhere else.

Also change default path.

test/test.sh

index f48681ff9428fd126b53b4f372086832a8f17984..3cc0e8c236dd7ffcfd1f9880aa64cb4903c00d78 100755 (executable)
@@ -5,7 +5,7 @@
 # - uses nc (netcat) with some tests, skips if not in path
 # - assumes postgres 8.2 fix your path so that it comes first
 
-export PATH=/usr/lib/postgresql/8.2/bin:$PATH
+export PATH=/usr/lib/postgresql/8.4/bin:$PATH
 export PGDATA=$PWD/pgdata
 export PGHOST=localhost
 export PGPORT=6667
@@ -34,7 +34,8 @@ rm -f $BOUNCER_LOG $PG_LOG
 
 if [ ! -d $PGDATA ]; then
        mkdir $PGDATA
-       initdb >/dev/null 2>&1
+       initdb >> $PG_LOG 2>&1
+       sed -i "/unix_socket_directory/s:.*unix_socket_directory.*:unix_socket_directory = '/tmp':" pgdata/postgresql.conf
 fi
 
 pgctl start