From 85332cadf80e34c31a2894aa10284ef07d36b3f6 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 7 Jan 2019 17:16:47 -0800 Subject: [PATCH 1/6] use python not curl --- .../certbot_apache/tests/apache-conf-files/apache-conf-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test b/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test index f27e0d3b1..7a974ada4 100755 --- a/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test +++ b/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test @@ -4,7 +4,7 @@ # with each of the "passing" conf files. SERVER="${SERVER:-http://localhost:4000/directory}" -if ! curl "$SERVER" >/dev/null 2>&1; then +if ! python -c "import requests; requests.get('$SERVER')"; then echo "ACME server not found." echo "Please set SERVER to the ACME server's directory URL." exit 1 From de1d71422f3c9aa9d8880a3c6667daa4a9282fbc Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Mon, 7 Jan 2019 17:47:31 -0800 Subject: [PATCH 2/6] use single env line --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 065de6533..78845367e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,9 +57,7 @@ matrix: before_install: addons: - python: "2.7" - env: - - BOULDER_FOR_TOX=1 - - TOXENV=apacheconftest + env: BOULDER_FOR_TOX=1 TOXENV=apacheconftest sudo: required - python: "2.7" env: TOXENV=nginxroundtrip From ecc43b8c4adcf4f8dd99d1c7d0f72015a9a6896c Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 8 Jan 2019 15:56:45 -0800 Subject: [PATCH 3/6] undo changes to .travis.yml --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78845367e..2b8eafc13 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ matrix: before_install: addons: - python: "2.7" - env: BOULDER_FOR_TOX=1 TOXENV=apacheconftest + env: TOXENV=apacheconftest sudo: required - python: "2.7" env: TOXENV=nginxroundtrip @@ -92,10 +92,8 @@ addons: install: "travis_retry $(command -v pip || command -v pip3) install codecov tox" script: - - '[ -z "${BOULDER_FOR_TOX+x}" ] || travis_retry tests/boulder-fetch.sh' - travis_retry tox - # If BOULDER_INTEGRATION is set, run integration tests. If BOULDER_FOR_TOX isn't set, we still need to start boulder. - - '[ -z "${BOULDER_INTEGRATION+x}" ] || ( ( [ -n "${BOULDER_FOR_TOX+x}" ] || travis_retry tests/boulder-fetch.sh ) && tests/tox-boulder-integration.sh)' + - '[ -z "${BOULDER_INTEGRATION+x}" ] || (travis_retry tests/boulder-fetch.sh && tests/tox-boulder-integration.sh)' after_success: '[ "$TOXENV" == "py27-cover" ] && codecov' From fcd23ac342b3cde814aa969285ec6b283b364abe Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 8 Jan 2019 15:58:41 -0800 Subject: [PATCH 4/6] require server be set --- .../certbot_apache/tests/apache-conf-files/apache-conf-test | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test b/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test index 7a974ada4..8bf3c2410 100755 --- a/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test +++ b/certbot-apache/certbot_apache/tests/apache-conf-files/apache-conf-test @@ -3,9 +3,7 @@ # A hackish script to see if the client is behaving as expected # with each of the "passing" conf files. -SERVER="${SERVER:-http://localhost:4000/directory}" -if ! python -c "import requests; requests.get('$SERVER')"; then - echo "ACME server not found." +if [ -z "$SERVER" ]; then echo "Please set SERVER to the ACME server's directory URL." exit 1 fi From cfbb4db629495399833a617277ffdeb13cbeb793 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 8 Jan 2019 16:01:41 -0800 Subject: [PATCH 5/6] Add testenv apacheconftest-with-pebble --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index 6a516a524..3a8b4fa7c 100644 --- a/tox.ini +++ b/tox.ini @@ -158,6 +158,13 @@ commands = passenv = SERVER +[testenv:apacheconftest-with-pebble] +commands = + {toxinidir}/tests/pebble-fetch.sh + {[testenv:apacheconftest]commands} +setenv = + SERVER=https://localhost:14000/dir + [testenv:nginxroundtrip] commands = {[base]pip_install} acme . certbot-apache certbot-nginx From cae60dc47d25682794f89d493e9b6fa6736944a2 Mon Sep 17 00:00:00 2001 From: Brad Warren Date: Tue, 8 Jan 2019 16:02:09 -0800 Subject: [PATCH 6/6] Have Travis use apacheconftest-with-pebble. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2b8eafc13..a5536197d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ matrix: before_install: addons: - python: "2.7" - env: TOXENV=apacheconftest + env: TOXENV=apacheconftest-with-pebble sudo: required - python: "2.7" env: TOXENV=nginxroundtrip