From a6196278aa844c7f0b543e2a05cedf4c702f88ae Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Tue, 7 Jul 2020 00:29:01 +0300 Subject: [PATCH] [fix] bash zabbix --- tests/all.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/all.sh b/tests/all.sh index 16dc626..097a1fe 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -158,7 +158,7 @@ testStatusScriptSocket() { PHP_POOL=$(getAnySocket) #Make the test: - DATA=$(sudo -u zabbix sudo bash "/etc/zabbix/zabbix_php_fpm_status.sh" "$PHP_POOL" "/php-fpm-status") + DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_status.sh" "$PHP_POOL" "/php-fpm-status") IS_OK=$(echo "$DATA" | grep -F '{"pool":"') assertNotNull "Failed to get status from pool $PHP_POOL: $DATA" "$IS_OK" echo "Success test of $PHP_POOL" @@ -169,7 +169,7 @@ testStatusScriptPort() { PHP_POOL="127.0.0.1:$PHP_PORT" #Make the test: - DATA=$(sudo -u zabbix sudo bash "/etc/zabbix/zabbix_php_fpm_status.sh" "$PHP_POOL" "/php-fpm-status") + DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_status.sh" "$PHP_POOL" "/php-fpm-status") IS_OK=$(echo "$DATA" | grep -F '{"pool":"') assertNotNull "Failed to get status from pool $PHP_POOL: $DATA" "$IS_OK" echo "Success test of $PHP_POOL" @@ -195,13 +195,13 @@ testZabbixStatusPort() { } testDiscoverScriptReturnsData() { - DATA=$(sudo -u zabbix sudo bash "/etc/zabbix/zabbix_php_fpm_discovery.sh" "/php-fpm-status") + DATA=$(sudo -u zabbix sudo "/etc/zabbix/zabbix_php_fpm_discovery.sh" "/php-fpm-status") IS_OK=$(echo "$DATA" | grep -F '{"data":[{"{#POOLNAME}"') assertNotNull "Discover script failed: $DATA" "$IS_OK" } testDiscoverScriptDebug() { - DATA=$(sudo -u zabbix sudo bash "/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:') assertNull "Discover script errors: $DATA" "$ERRORS_LIST" }