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

[fix] discover pools errors

This commit is contained in:
Ramil Valitov 2020-07-07 00:56:13 +03:00
parent 6b8e58dc66
commit ad9435ee39
No known key found for this signature in database
GPG Key ID: 2AB186DABDFE1914
2 changed files with 5 additions and 4 deletions

View File

@ -21,8 +21,8 @@ jobs:
- zabbix-agent - zabbix-agent
before_script: before_script:
- sudo curl -o /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2 - sudo curl -o /usr/local/bin/shunit2 https://raw.githubusercontent.com/kward/shunit2/master/shunit2
- sudo apt-get -y purge jq - sudo apt-get -y remove jq
- sudo apt-get -y purge libfcgi-bin libfcgi0ldbl - sudo apt-get -y remove libfcgi-bin libfcgi0ldbl
- sudo apt autoremove - sudo apt autoremove
- jq --version - jq --version
script: bash tests/missing.sh script: bash tests/missing.sh

View File

@ -191,8 +191,9 @@ testDiscoverScriptReturnsData() {
testDiscoverScriptDebug() { testDiscoverScriptDebug() {
DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_discovery.sh" "debug" "/php-fpm-status") DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_discovery.sh" "debug" "/php-fpm-status")
ERRORS_LIST=$(echo "$DATA" | grep -F 'Error:') NUMBER_OF_ERRORS=$(echo "$DATA" | grep -o -F 'Error:' | wc -l)
assertNull "Discover script errors: $DATA" "$ERRORS_LIST" PHP_COUNT=$(getNumberOfPHPVersions)
assertEquals "Discover script errors: $DATA" "$PHP_COUNT" "$NUMBER_OF_ERRORS"
} }
testZabbixDiscoverReturnsData() { testZabbixDiscoverReturnsData() {