3
0
mirror of https://github.com/rvalitov/zabbix-php-fpm.git synced 2023-11-05 03:30:27 +01:00

[fix] discover script errors

This commit is contained in:
Ramil Valitov 2020-07-07 01:13:01 +03:00
parent 5b7f642e49
commit e72e760724
No known key found for this signature in database
GPG Key ID: 2AB186DABDFE1914

View File

@ -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() {