From e72e760724f61a918047dbb3cc1c964001b3be01 Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Tue, 7 Jul 2020 01:13:01 +0300 Subject: [PATCH] [fix] discover script errors --- tests/all.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/all.sh b/tests/all.sh index 399e40b..7c897fa 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -193,7 +193,14 @@ testDiscoverScriptDebug() { DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_discovery.sh" "debug" "/php-fpm-status") NUMBER_OF_ERRORS=$(echo "$DATA" | grep -o -F 'Error:' | wc -l) PHP_COUNT=$(getNumberOfPHPVersions) - assertEquals "Discover script errors: $DATA" "$PHP_COUNT" "$NUMBER_OF_ERRORS" + if [[ $PHP_COUNT != $NUMBER_OF_ERRORS ]]; then + ERRORS_LIST=$(echo "$DATA" | grep -F 'Error:') + echo "Errors list:" + echo "$ERRORS_LIST" + echo "Full output:" + echo "$DATA" + fi + assertEquals "Discover script errors mismatch" "$PHP_COUNT" "$NUMBER_OF_ERRORS" } testZabbixDiscoverReturnsData() {