index 751b22ba9c00f58325bc2956bd5180278fb2eb13..8b25ed3cc062627115f32bdb45e62abde3a54b66 100755 (executable)
output="$( run_sysdb -H "$SOCKET_FILE" \
-c "LOOKUP hosts MATCHING ANY attribute != '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 != 'architecture'" )"
echo "$output" \
| grep -F '"some.host.name"' \
| grep -F '"localhost"'
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"'