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

WIP tests for commands

This commit is contained in:
Ramil Valitov 2020-07-07 00:22:29 +03:00
parent a8d99dc7f3
commit 9be8a6af6d
No known key found for this signature in database
GPG Key ID: 2AB186DABDFE1914
4 changed files with 21 additions and 22 deletions

View File

@ -21,6 +21,9 @@ 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 purge libfcgi-bin libfcgi0ldbl
- sudo apt autoremove
script: bash tests/missing.sh script: bash tests/missing.sh
- os: linux - os: linux
dist: bionic dist: bionic

View File

@ -17,10 +17,6 @@ oneTimeSetUp() {
sudo chmod +x /etc/zabbix/zabbix_php_fpm_discovery.sh sudo chmod +x /etc/zabbix/zabbix_php_fpm_discovery.sh
sudo chmod +x /etc/zabbix/zabbix_php_fpm_status.sh sudo chmod +x /etc/zabbix/zabbix_php_fpm_status.sh
sudo apt-get -y purge jq
sudo apt-get -y purge libfcgi-bin libfcgi0ldbl
sudo apt autoremove
echo "All done, starting tests..." echo "All done, starting tests..."
} }

View File

@ -44,67 +44,67 @@ S_DATE=$(type -P date)
S_BC=$(type -P bc) S_BC=$(type -P bc)
S_SLEEP=$(type -P sleep) S_SLEEP=$(type -P sleep)
if [[ ! -f $S_PS ]]; then if [[ ! -x $S_PS ]]; then
${S_ECHO} "Utility 'ps' not found. Please, install it first." ${S_ECHO} "Utility 'ps' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_GREP ]]; then if [[ ! -x $S_GREP ]]; then
${S_ECHO} "Utility 'grep' not found. Please, install it first." ${S_ECHO} "Utility 'grep' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_AWK ]]; then if [[ ! -x $S_AWK ]]; then
${S_ECHO} "Utility 'awk' not found. Please, install it first." ${S_ECHO} "Utility 'awk' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_SORT ]]; then if [[ ! -x $S_SORT ]]; then
${S_ECHO} "Utility 'sort' not found. Please, install it first." ${S_ECHO} "Utility 'sort' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_UNIQ ]]; then if [[ ! -x $S_UNIQ ]]; then
${S_ECHO} "Utility 'uniq' not found. Please, install it first." ${S_ECHO} "Utility 'uniq' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_HEAD ]]; then if [[ ! -x $S_HEAD ]]; then
${S_ECHO} "Utility 'head' not found. Please, install it first." ${S_ECHO} "Utility 'head' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_LSOF ]]; then if [[ ! -x $S_LSOF ]]; then
${S_ECHO} "Utility 'lsof' not found. Please, install it first." ${S_ECHO} "Utility 'lsof' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_JQ ]]; then if [[ ! -x $S_JQ ]]; then
${S_ECHO} "Utility 'jq' not found. Please, install it first." ${S_ECHO} "Utility 'jq' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f ${S_DIRNAME} ]]; then if [[ ! -x ${S_DIRNAME} ]]; then
${S_ECHO} "Utility 'dirname' not found. Please, install it first." ${S_ECHO} "Utility 'dirname' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f ${S_CAT} ]]; then if [[ ! -x ${S_CAT} ]]; then
${S_ECHO} "Utility 'cat' not found. Please, install it first." ${S_ECHO} "Utility 'cat' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f ${S_BASH} ]]; then if [[ ! -x ${S_BASH} ]]; then
${S_ECHO} "Utility 'bash' not found. Please, install it first." ${S_ECHO} "Utility 'bash' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f ${S_PRINTF} ]]; then if [[ ! -x ${S_PRINTF} ]]; then
${S_ECHO} "Utility 'printf' not found. Please, install it first." ${S_ECHO} "Utility 'printf' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f ${S_WHOAMI} ]]; then if [[ ! -x ${S_WHOAMI} ]]; then
${S_ECHO} "Utility 'whoami' not found. Please, install it first." ${S_ECHO} "Utility 'whoami' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f ${S_DATE} ]]; then if [[ ! -x ${S_DATE} ]]; then
${S_ECHO} "Utility 'date' not found. Please, install it first." ${S_ECHO} "Utility 'date' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_BC ]]; then if [[ ! -x $S_BC ]]; then
$S_ECHO "Utility 'bc' not found. Please, install it first." $S_ECHO "Utility 'bc' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_SLEEP ]]; then if [[ ! -x $S_SLEEP ]]; then
$S_ECHO "Utility 'sleep' not found. Please, install it first." $S_ECHO "Utility 'sleep' not found. Please, install it first."
exit 1 exit 1
fi fi

View File

@ -6,12 +6,12 @@
S_FCGI=$(type -P cgi-fcgi) S_FCGI=$(type -P cgi-fcgi)
S_GREP=$(type -P grep) S_GREP=$(type -P grep)
if [[ ! -f $S_FCGI ]]; then if [[ ! -x $S_FCGI ]]; then
echo "Utility 'cgi-fcgi' not found. Please, install it first." echo "Utility 'cgi-fcgi' not found. Please, install it first."
exit 1 exit 1
fi fi
if [[ ! -f $S_GREP ]]; then if [[ ! -x $S_GREP ]]; then
echo "Utility 'grep' not found. Please, install it first." echo "Utility 'grep' not found. Please, install it first."
exit 1 exit 1
fi fi