mirror of
https://github.com/rvalitov/zabbix-php-fpm.git
synced 2023-11-05 03:30:27 +01:00
[add] zabbix discover test
This commit is contained in:
parent
5318b36d0a
commit
930e8f98d1
@ -136,5 +136,11 @@ testDiscoverScriptReturnsData() {
|
|||||||
assertNotNull "Discover script failed: $DATA" "$IS_OK"
|
assertNotNull "Discover script failed: $DATA" "$IS_OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
testZabbixDiscoverReturnsData() {
|
||||||
|
DATA=$(zabbix_get -s 127.0.0.1 -p 10050 -k php-fpm.discover["/php-fpm-status"])
|
||||||
|
IS_OK=$(echo "$DATA" | grep -F '{"data":[{"{#POOLNAME}"')
|
||||||
|
assertNotNull "Discover script failed: $DATA" "$IS_OK"
|
||||||
|
}
|
||||||
|
|
||||||
# Load shUnit2.
|
# Load shUnit2.
|
||||||
. shunit2
|
. shunit2
|
||||||
|
Loading…
Reference in New Issue
Block a user