Browse Source

Fixes for centos6 automated test hanging

pull/715/head
Tim Kimber 4 years ago
parent
commit
0462542f7d
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
5 changed files with 15 additions and 8 deletions
  1. +2
    -2
      test/33-ftp.bats
  2. +2
    -2
      test/34-ftp-passive.bats
  3. +7
    -1
      test/restart-ftpd
  4. +2
    -1
      test/restart-nginx
  5. +2
    -2
      test/test_helper.bash

+ 2
- 2
test/33-ftp.bats View File

@ -18,7 +18,7 @@ setup() {
pasv_enable=NO
_FTP
${CODE_DIR}/test/restart-ftpd
${CODE_DIR}/test/restart-ftpd start
fi
}
@ -27,7 +27,7 @@ teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
if [ -n "${VSFTPD_CONF}" ]; then
cp ${VSFTPD_CONF}.getssl $VSFTPD_CONF
${CODE_DIR}/test/restart-ftpd
${CODE_DIR}/test/restart-ftpd stop
fi
}


+ 2
- 2
test/34-ftp-passive.bats View File

@ -21,7 +21,7 @@ pasv_min_port=10090
connect_from_port_20=NO
_FTP
${CODE_DIR}/test/restart-ftpd
${CODE_DIR}/test/restart-ftpd start
fi
}
@ -30,7 +30,7 @@ teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
if [ -n "${VSFTPD_CONF}" ]; then
cp ${VSFTPD_CONF}.getssl $VSFTPD_CONF
${CODE_DIR}/test/restart-ftpd
${CODE_DIR}/test/restart-ftpd stop
fi
}


+ 7
- 1
test/restart-ftpd View File

@ -1,11 +1,17 @@
#!/usr/bin/env bash
if [ -z "$1" ]; then
arg="restart"
else
arg=$1
fi
if [ "$GETSSL_OS" = "alpine" ]; then
killall -HUP vsftpd >&3-
elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then
pgrep vsftpd | head -1 | xargs kill -HUP
elif [[ "$GETSSL_OS" == "centos6" ]]; then
service vsftpd restart >&3- >/dev/null
service vsftpd "$arg"
else
service vsftpd restart >/dev/null >&3-
fi

+ 2
- 1
test/restart-nginx View File

@ -7,7 +7,8 @@ elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then
pgrep nginx | head -1 | xargs kill -HUP
sleep 5
elif [[ "$GETSSL_OS" == "centos6" ]]; then
service nginx restart >&3- >/dev/null
service nginx restart 3>&-
# service nginx restart
else
service nginx restart >/dev/null >&3-
fi

+ 2
- 2
test/test_helper.bash View File

@ -74,10 +74,10 @@ if [[ -f /usr/bin/supervisord && -f /etc/supervisord.conf ]]; then
fi
elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then
if [ -z "$(pgrep nginx)" ]; then
nginx >&3-
nginx 3>&-
fi
if [ -z "$(pgrep vsftpd)" ] && [ "$(command -v vsftpd)" ]; then
vsftpd >&3-
vsftpd 3>&-
fi
fi


Loading…
Cancel
Save