diff --git a/.travis.yml b/.travis.yml index 0c967b6..8fea9bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,8 @@ jobs: - zabbix-agent before_script: - 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 purge libfcgi-bin libfcgi0ldbl + - sudo apt-get -y remove jq + - sudo apt-get -y remove libfcgi-bin libfcgi0ldbl - sudo apt autoremove - jq --version script: bash tests/missing.sh diff --git a/tests/all.sh b/tests/all.sh index a84a090..414df01 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -191,8 +191,9 @@ testDiscoverScriptReturnsData() { testDiscoverScriptDebug() { DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_discovery.sh" "debug" "/php-fpm-status") - ERRORS_LIST=$(echo "$DATA" | grep -F 'Error:') - assertNull "Discover script errors: $DATA" "$ERRORS_LIST" + NUMBER_OF_ERRORS=$(echo "$DATA" | grep -o -F 'Error:' | wc -l) + PHP_COUNT=$(getNumberOfPHPVersions) + assertEquals "Discover script errors: $DATA" "$PHP_COUNT" "$NUMBER_OF_ERRORS" } testZabbixDiscoverReturnsData() {