3
0
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:
Ramil Valitov 2020-06-29 01:18:44 +03:00
parent 5318b36d0a
commit 930e8f98d1
No known key found for this signature in database
GPG Key ID: 2AB186DABDFE1914

View File

@ -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