X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=blobdiff_plain;f=t%2Fintegration%2Fmatching.sh;h=2c9d8f386395a7da3a63e9630276ce2c35d72a97;hp=751b22ba9c00f58325bc2956bd5180278fb2eb13;hb=dc7d88e992d19870cbec25244e0f1d4ddc0541b7;hpb=dcae4c1b3d8a756ad894c15f36bce985bc09a2aa diff --git a/t/integration/matching.sh b/t/integration/matching.sh index 751b22b..2c9d8f3 100755 --- a/t/integration/matching.sh +++ b/t/integration/matching.sh @@ -38,7 +38,8 @@ Listen "$SOCKET_FILE" PluginDir "$PLUGIN_DIR" Interval 2 -LoadBackend mock_plugin +LoadPlugin "store::memory" +LoadBackend "mock_plugin" EOF @@ -49,7 +50,7 @@ wait_for_sysdbd sleep 3 output="$( run_sysdb -H "$SOCKET_FILE" \ - -c "LOOKUP hosts MATCHING ANY metric = 'foo/bar/qux'" )" + -c "LOOKUP hosts MATCHING ANY metric.name = 'foo/bar/qux'" )" echo "$output" \ | grep -F '"some.host.name"' \ | grep -F '"other.host.name"' @@ -58,7 +59,7 @@ 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 service = 'mock service'" )" + -c "LOOKUP hosts MATCHING ANY service.name = 'mock service'" )" echo "$output" \ | grep -F '"some.host.name"' \ | grep -F '"host1.example.com"' \ @@ -76,7 +77,16 @@ echo "$output" | grep -F 'other.host.name' && exit 1 echo "$output" | grep -F 'some.host.name' && exit 1 output="$( run_sysdb -H "$SOCKET_FILE" \ - -c "LOOKUP hosts MATCHING ANY attribute != 'architecture'" )" + -c "LOOKUP hosts MATCHING ANY attribute.name != 'architecture'" )" +echo "$output" \ + | grep -F '"localhost"' \ + | grep -F '"other.host.name"' \ + | grep -F '"host1.example.com"' \ + | grep -F '"host2.example.com"' +echo "$output" | grep -F 'some.host.name' && exit 1 + +output="$( run_sysdb -H "$SOCKET_FILE" \ + -c "LOOKUP hosts MATCHING ALL attribute.name != 'architecture'" )" echo "$output" \ | grep -F '"some.host.name"' \ | grep -F '"localhost"' @@ -85,7 +95,7 @@ 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 service = 'sysdbd'" )" + -c "LOOKUP hosts MATCHING ANY 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 @@ -93,7 +103,7 @@ 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 host =~ 'example.com'" )" + -c "LOOKUP hosts MATCHING name =~ 'example.com'" )" echo "$output" \ | grep -F '"host1.example.com"' \ | grep -F '"host2.example.com"' @@ -108,3 +118,4 @@ echo $output | grep -E '^\[\]$' stop_sysdbd +# vim: set tw=78 sw=4 ts=4 noexpandtab :