Skip to content

Commit

Permalink
Updates to standalone cert test unit
Browse files Browse the repository at this point in the history
  • Loading branch information
buchdag committed Aug 22, 2018
1 parent 7174a36 commit b6af199
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/tests/certs_standalone/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ else
echo "Domain ${domains[0]} did not appear on certificate."
fi

docker exec "$le_container_name" bash -c "[[ -f /etc/nginx/conf.d/standalone-cert-${domains[0]}.conf ]]" \
&& echo "Standalone configuration for ${domains[0]} wasn't correctly removed."

# Add another (SAN) certificate to letsencrypt_user_data
cat > ${TRAVIS_BUILD_DIR}/test/tests/certs_standalone/letsencrypt_user_data <<EOF
LETSENCRYPT_STANDALONE_CERTS=('single' 'san')
Expand All @@ -58,6 +61,9 @@ for domain in "${domains[1]}" "${domains[2]}"; do
fi
done

docker exec "$le_container_name" bash -c "[[ -f /etc/nginx/conf.d/standalone-cert-${domains[1]}.conf ]]" \
&& echo "Standalone configuration for ${domains[1]} wasn't correctly removed."

# Cleanup the files created by this run of the test to avoid foiling following test(s).
docker exec "$le_container_name" sh -c 'rm -rf /etc/nginx/certs/le?.wtf*'
docker stop "$le_container_name" > /dev/null

0 comments on commit b6af199

Please sign in to comment.