Code

simple_query.sh: Store output in a variable before analyzing it.
authorSebastian Harl <sh@tokkee.org>
Wed, 30 Apr 2014 09:39:52 +0000 (11:39 +0200)
committerSebastian Harl <sh@tokkee.org>
Wed, 30 Apr 2014 09:39:52 +0000 (11:39 +0200)
This ensures that we actually get and check the right exit code.

t/integration/simple_query.sh

index 3473fa1c89535475e3947ecefd25525a016ffc3f..7c6277554577510e7bb7536d0be4c121ae74d07d 100755 (executable)
@@ -49,7 +49,8 @@ sysdbd_pid=$!
 wait_for_sysdbd
 sleep 3
 
-"$SYSDB" -H "$SOCKET_FILE" -c LIST \
+output="$( $SYSDB -H "$SOCKET_FILE" -c LIST )"
+echo "$output" \
        | grep -F '"host1.example.com"' \
        | grep -F "host2.example.com" \
        | grep -F "localhost" \