Skip to content

Commit

Permalink
Check for internal test before checking if previous test succeeded
Browse files Browse the repository at this point in the history
  • Loading branch information
timkimber committed Nov 1, 2022
1 parent cca04dd commit dc13594
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/34-ftp-ports.bats
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ teardown() {


@test "Use ftpes, FTP_PORT=1001 (explicit ssl, port 1001) to create challenge file" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
fi

if [[ ! -f /etc/vsftpd.pem ]]; then
echo "FAILED: This test requires the previous test to succeed"
exit 1
fi

if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
fi

if [[ ! -d /var/www/html/.well-known/acme-challenge ]]; then
mkdir -p /var/www/html/.well-known/acme-challenge
fi
Expand Down Expand Up @@ -103,15 +103,15 @@ EOF


@test "Use ftps, FTP_PORT=2002 (implicit ssl, port 2002) to create challenge file" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
fi

if [[ ! -f /etc/vsftpd.pem ]]; then
echo "FAILED: This test requires the previous test to succeed"
exit 1
fi

if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
fi

# Restart vsftpd listening on port 990
cat <<- _FTP >> $VSFTPD_CONF
implicit_ssl=YES
Expand Down

0 comments on commit dc13594

Please sign in to comment.