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:
parent
5b7f642e49
commit
e72e760724
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user