From: Sebastian Harl Date: Mon, 28 Apr 2014 07:52:35 +0000 (+0200) Subject: t/integration/: Added variables for sysdbd/sysdb/sysdb.conf. X-Git-Tag: sysdb-0.1.0~66 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=70f2bd7d997c5b53681e4e5a7e0d02124c306bd0;p=sysdb.git t/integration/: Added variables for sysdbd/sysdb/sysdb.conf. --- diff --git a/t/integration/simple_config.sh b/t/integration/simple_config.sh index 3484351..677f53c 100755 --- a/t/integration/simple_config.sh +++ b/t/integration/simple_config.sh @@ -33,20 +33,20 @@ set -e source "$( dirname "$0" )/test_lib.sh" -cat < "$TESTDIR/sysdbd.conf" +cat < "$SYSDBD_CONF" Listen "invalid://address" EOF -if "$TOP_SRCDIR/src/sysdbd" -D -C "$TESTDIR/sysdbd.conf"; then +if "$SYSDBD" -D -C "$SYSDBD_CONF"; then echo 'SysDBd accepted invalid listen address; expected: failure' >&2 exit 1 fi -cat < "$TESTDIR/sysdbd.conf" +cat < "$SYSDBD_CONF" Listen "$SOCKET_FILE" EOF -"$TOP_SRCDIR/src/sysdbd" -D -C "$TESTDIR/sysdbd.conf" & +"$SYSDBD" -D -C "$SYSDBD_CONF" & sysdbd_pid=$! wait_for_sysdbd diff --git a/t/integration/simple_query.sh b/t/integration/simple_query.sh index 37c57a1..d091e2b 100755 --- a/t/integration/simple_query.sh +++ b/t/integration/simple_query.sh @@ -33,7 +33,7 @@ set -e source "$( dirname "$0" )/test_lib.sh" -cat < "$TESTDIR/sysdbd.conf" +cat < "$SYSDBD_CONF" Listen "$SOCKET_FILE" PluginDir "$PLUGIN_DIR" Interval 2 @@ -43,13 +43,13 @@ LoadBackend mock_plugin EOF -"$TOP_SRCDIR/src/sysdbd" -D -C "$TESTDIR/sysdbd.conf" & +"$SYSDBD" -D -C "$SYSDBD_CONF" & sysdbd_pid=$! wait_for_sysdbd sleep 3 -"$TOP_SRCDIR/src/sysdb" -H "$SOCKET_FILE" -c LIST \ +"$SYSDB" -H "$SOCKET_FILE" -c LIST \ | grep -F '"host1.example.com"' \ | grep -F "host2.example.com" \ | grep -F "localhost" \ diff --git a/t/integration/test_lib.sh b/t/integration/test_lib.sh index 85bffb9..b91cb0c 100644 --- a/t/integration/test_lib.sh +++ b/t/integration/test_lib.sh @@ -35,9 +35,14 @@ trap "rm -rf '$TESTDIR'" EXIT mkdir "$TESTDIR/backend" cp "$TOP_SRCDIR/t/integration/.libs/mock_plugin.so" "$TESTDIR/backend" +SYSDBD_CONF="$TESTDIR/sysdbd.conf" + SOCKET_FILE="$TESTDIR/sock" PLUGIN_DIR="$TESTDIR" +SYSDBD="$TOP_SRCDIR/src/sysdbd" +SYSDB="$TOP_SRCDIR/src/sysdb" + function wait_for_sysdbd() { local i for (( i=0; i<10; i++ )); do