From 4784d7828049241e0bd2cd4ec2903d83e112643e Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Mon, 29 Jun 2020 02:16:36 +0300 Subject: [PATCH] [add] discovery debug errors --- tests/all.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/all.sh b/tests/all.sh index 4f4ec8f..b291922 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -149,6 +149,13 @@ testDiscoverScriptReturnsData() { assertNotNull "Discover script failed: $DATA" "$IS_OK" } +testDiscoverScriptDebug() { + DATA=$(sudo bash "/etc/zabbix/zabbix_php_fpm_discovery.sh" "debug" "/php-fpm-status") + ERRORS_LIST=$(echo "$DATA" | grep -F 'Error:') + assertNull "Discover script errors: $ERRORS_LIST" "$ERRORS_LIST" + +} + 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}"')