Code

t/integration: Add a simple time-series fetcher test.
[sysdb.git] / t / integration / filter.sh
index 9c9fb0cf17de6c5b08d60010abac317bd04b12e0..ddcf78532bbee17d85852c367b95f0155a15ab14 100755 (executable)
@@ -50,21 +50,21 @@ sleep 3
 
 output="$( run_sysdb -H "$SOCKET_FILE" \
        -c "LOOKUP hosts MATCHING ANY attribute != 'architecture' 
-               FILTER .age >= 0s" )"
+               FILTER age >= 0s" )"
 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
+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="$( run_sysdb -H "$SOCKET_FILE" \
        -c "LOOKUP hosts MATCHING ANY attribute != 'architecture' 
-               FILTER .last_update < 2Y" )"
+               FILTER last_update < 2Y" )"
 echo $output | grep -E '^\[\]$'
 
 output="$( run_sysdb -H "$SOCKET_FILE" \
-       -c "LOOKUP hosts FILTER 'backend::mock_plugin' IN .backend" )"
+       -c "LOOKUP hosts FILTER 'backend::mock_plugin' IN backend" )"
 echo "$output" \
        | grep -F '"host1.example.com"' \
        | grep -F '"host2.example.com"' \
@@ -72,8 +72,9 @@ echo "$output" \
        | grep -F '"other.host.name"' \
        | grep -F '"some.host.name"'
 output="$( run_sysdb -H "$SOCKET_FILE" \
-       -c "LOOKUP hosts FILTER 'invalid' IN .backend" )"
+       -c "LOOKUP hosts FILTER 'invalid' IN backend" )"
 echo $output | grep -E '^\[\]$'
 
 stop_sysdbd
 
+# vim: set tw=78 sw=4 ts=4 noexpandtab :