From: Sebastian Harl Date: Thu, 1 May 2014 14:15:43 +0000 (+0200) Subject: integration/simple_query: Added more types of simple queries. X-Git-Tag: sysdb-0.1.0~51 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ba731a056789ac030a09acc2ff15fe5d740b8215;p=sysdb.git integration/simple_query: Added more types of simple queries. --- diff --git a/t/integration/simple_query.sh b/t/integration/simple_query.sh index ec83f20..232d3e1 100755 --- a/t/integration/simple_query.sh +++ b/t/integration/simple_query.sh @@ -84,6 +84,32 @@ echo "$output" | grep -F 'localhost' && exit 1 echo "$output" | grep -F 'other.host.name' && exit 1 echo "$output" | grep -F 'some.host.name' && exit 1 +output="$( $SYSDB -H "$SOCKET_FILE" \ + -c "LOOKUP hosts WHERE attribute.name != 'architecture'" )" +echo "$output" \ + | grep -F '"some.host.name"' \ + | grep -F '"localhost"' +echo "$output" | grep -F 'other.host.name' && exit 1 +echo "$output" | grep -F 'host1.example.com' && exit 1 +echo "$output" | grep -F 'host2.example.com' && exit 1 + +output="$( $SYSDB -H "$SOCKET_FILE" \ + -c "LOOKUP hosts WHERE service.name = 'sysdbd'" )" +echo "$output" | grep -F '"localhost"' +echo "$output" | grep -F 'some.host.name' && exit 1 +echo "$output" | grep -F 'other.host.name' && exit 1 +echo "$output" | grep -F 'host1.example.com' && exit 1 +echo "$output" | grep -F 'host2.example.com' && exit 1 + +output="$( $SYSDB -H "$SOCKET_FILE" \ + -c "LOOKUP hosts WHERE host.name =~ 'example.com'" )" +echo "$output" \ + | grep -F '"host1.example.com"' \ + | grep -F '"host2.example.com"' +echo "$output" | grep -F 'some.host.name' && exit 1 +echo "$output" | grep -F 'other.host.name' && exit 1 +echo "$output" | grep -F 'localhost' && exit 1 + kill $sysdbd_pid wait $sysdbd_pid