From bdec0f2a2b249335b8282ab35c2ae5f0f04192dd Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Thu, 19 Feb 2015 17:02:20 +0000 Subject: [PATCH] Be explicit about using /tmp for temporary datafiles If TMPDIR is not set, different version of mktemp will behave differently. To be sure, best to be explicit. Change-Id: Id92eb4e5b833a1c0859a0c6d68cfc2f4e1f6977f --- setup-test-env-mongodb.sh | 2 +- setup-test-env-postgresql.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/setup-test-env-mongodb.sh b/setup-test-env-mongodb.sh index 3dcad1e90..547168a38 100755 --- a/setup-test-env-mongodb.sh +++ b/setup-test-env-mongodb.sh @@ -12,7 +12,7 @@ export PATH=${PATH:+$PATH:}/sbin:/usr/sbin check_for_cmd mongod # Start MongoDB process for tests -MONGO_DATA=`mktemp -d CEILO-MONGODB-XXXXX` +MONGO_DATA=`mktemp -d /tmp/CEILO-MONGODB-XXXXX` MONGO_PORT=29000 trap "clean_exit ${MONGO_DATA}" EXIT mkfifo ${MONGO_DATA}/out diff --git a/setup-test-env-postgresql.sh b/setup-test-env-postgresql.sh index be5c6b8e2..002fd9f44 100755 --- a/setup-test-env-postgresql.sh +++ b/setup-test-env-postgresql.sh @@ -21,7 +21,7 @@ function clean_exit_pgsql(){ check_for_cmd pg_config # Start PostgreSQL process for tests -PGSQL_DATA=`mktemp -d CEILO-PGSQL-XXXXX` +PGSQL_DATA=`mktemp -d /tmp/CEILO-PGSQL-XXXXX` PGSQL_PATH=`pg_config --bindir` PGSQL_PORT=9823 ${PGSQL_PATH}/initdb -E UTF8 ${PGSQL_DATA} @@ -31,4 +31,4 @@ LANGUAGE=C ${PGSQL_PATH}/pg_ctl -w -D ${PGSQL_DATA} -o "-N 100 -F -k ${PGSQL_DAT export CEILOMETER_TEST_PGSQL_URL="postgresql:///?host=${PGSQL_DATA}&port=${PGSQL_PORT}&dbname=template1" # Yield execution to venv command -$* \ No newline at end of file +$*