From 930e8f98d15fea9498b795ad38ebe0cd5be7bef3 Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Mon, 29 Jun 2020 01:18:44 +0300 Subject: [PATCH] [add] zabbix discover test --- tests/all.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/all.sh b/tests/all.sh index d186c4a..9a04191 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -136,5 +136,11 @@ testDiscoverScriptReturnsData() { 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. . shunit2