mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 16:30:31 +02:00
apacheconf: sane sudo letsencrypt (fixes #2800)
- hardcoded `LETSENCRYPT=/home/travis/build/letsencrypt/letsencrypt/.tox/apacheconftest/bin/letsencrypt` causes Travis tests to fail if running under any other Travis user (from e.g. a fork) - `sudo env "PATH=$PATH" letsencrypt` should make sure that sudo can find letsencrypt binary from virtualenv; realpath is not necessary - sudo is called already from within the test script, no need to sudo the entire script
This commit is contained in:
@@ -5,9 +5,7 @@
|
||||
|
||||
export EA=/etc/apache2/
|
||||
TESTDIR="`dirname $0`"
|
||||
LEROOT="`realpath \"$TESTDIR/../../../../\"`"
|
||||
cd $TESTDIR/passing
|
||||
LETSENCRYPT="${LETSENCRYPT:-$LEROOT/venv/bin/letsencrypt}"
|
||||
|
||||
function CleanupExit() {
|
||||
echo control c, exiting tests...
|
||||
@@ -61,7 +59,7 @@ trap CleanupExit INT
|
||||
for f in *.conf ; do
|
||||
echo -n testing "$f"...
|
||||
Setup
|
||||
RESULT=`echo c | sudo "$LETSENCRYPT" -vvvv --debug --staging --apache --register-unsafely-without-email --agree-tos certonly -t 2>&1`
|
||||
RESULT=`echo c | sudo env "PATH=$PATH" letsencrypt -vvvv --debug --staging --apache --register-unsafely-without-email --agree-tos certonly -t 2>&1`
|
||||
if echo $RESULT | grep -Eq \("Which names would you like"\|"mod_macro is not yet"\) ; then
|
||||
echo passed
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user