summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8702f18)
raw | patch | inline | side by side (parent: 8702f18)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 19 Jul 2014 12:25:55 +0000 (14:25 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 19 Jul 2014 12:25:55 +0000 (14:25 +0200) |
This covers some more code.
t/integration/simple_query.sh | patch | blob | history |
index 22bd815a95f4733ef09c52f44b2996b9ca13de13..a474a524367eb213b1e8f614c3ea085b25a0fa64 100755 (executable)
echo "$output" | grep "Failed to parse query 'INVALID'"
echo "$output" | grep "parse error: syntax error"
+# Simple, successful commands.
output="$( run_sysdb -H "$SOCKET_FILE" -c LIST )"
echo "$output" \
| grep -F '"host1.example.com"' \
| grep -F '"other.host.name"' \
| grep -F '"some.host.name"'
+output="$( echo 'LIST;' | run_sysdb -H "$SOCKET_FILE" )" || echo $?
+echo "$output" \
+ | grep -F '"host1.example.com"' \
+ | grep -F '"host2.example.com"' \
+ | grep -F '"localhost"' \
+ | grep -F '"other.host.name"' \
+ | grep -F '"some.host.name"'
+
output="$( run_sysdb -H "$SOCKET_FILE" -c "FETCH 'host1.example.com'" )"
echo "$output" \
| grep -F '"host1.example.com"' \
echo "$output" | grep -F 'other.host.name' && exit 1
echo "$output" | grep -F 'some.host.name' && exit 1
+(echo 'LIST;'; sleep 1; echo "FETCH 'host1.example.com'") \
+ | run_sysdb -H "$SOCKET_FILE"
+
# When requesting information for unknown hosts, expect a non-zero exit code.
output="$( run_sysdb -H "$SOCKET_FILE" -c "FETCH 'does.not.exist'" )" \
&& exit 1