From ba731a056789ac030a09acc2ff15fe5d740b8215 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Thu, 1 May 2014 16:15:43 +0200 Subject: [PATCH] integration/simple_query: Added more types of simple queries. --- t/integration/simple_query.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 -- 2.30.2