mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:54:56 +02:00
Enable test farm tests in Travis (#7072)
You can see the full test suite running at https://travis-ci.com/certbot/certbot/builds/112291892. A few noteworthy things: --fast is included because without, the tests would sometimes reach Travis' 50 minute timeout even with 1 test script per Travis build. The only script that is run at release time which is not being run here is https://github.com/certbot/certbot/blob/master/tests/letstest/scripts/test_tests.sh because that script runs tests on the packages installed by certbot-auto which won't be updated until midway through a release. We check TRAVIS_PULL_REQUEST and error out if it is not false for simplicity which should be fine because these tests are never run on PRs. The reason it's more complex to run test farm tests on PRs is the test farm tests need a named branch to pull from and Travis effectively merges the PR into the target branch before running tests complicating this. I don't think this should block this PRs, but the one final change we may want to make to the current setup is #7071. * Add encrypted private key. * Add test farm tests to tox and travis. * Change magic profile name. * Further split test farm tests. * Build local branch. * more depth
This commit is contained in:
+22
@@ -94,6 +94,28 @@ matrix:
|
||||
<<: *not-on-master
|
||||
|
||||
# Extended test suite on cron jobs and pushes to tested branches other than master
|
||||
- python: "2.7"
|
||||
env:
|
||||
- TOXENV=travis-test-farm-apache2
|
||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
||||
<<: *extended-test-suite
|
||||
- python: "2.7"
|
||||
env:
|
||||
- TOXENV=travis-test-farm-leauto-upgrades
|
||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
||||
git:
|
||||
depth: false # This is needed to have the history to checkout old versions of certbot-auto.
|
||||
<<: *extended-test-suite
|
||||
- python: "2.7"
|
||||
env:
|
||||
- TOXENV=travis-test-farm-certonly-standalone
|
||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
||||
<<: *extended-test-suite
|
||||
- python: "2.7"
|
||||
env:
|
||||
- TOXENV=travis-test-farm-sdists
|
||||
- secure: "f+j/Lj9s1lcuKo5sEFrlRd1kIAMnIJI4z0MTI7QF8jl9Fkmbx7KECGzw31TNgzrOSzxSapHbcueFYvNCLKST+kE/8ogMZBbwqXfEDuKpyF6BY3uYoJn+wPVE5pIb8Hhe08xPte8TTDSMIyHI3EyTfcAKrIreauoArePvh/cRvSw="
|
||||
<<: *extended-test-suite
|
||||
- python: "3.7"
|
||||
dist: xenial
|
||||
env: TOXENV=py37 CERTBOT_NO_PIN=1
|
||||
|
||||
Executable
+10
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash -ex
|
||||
#
|
||||
# Preps the test farm tests to be run in Travis.
|
||||
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
echo This script must be run in Travis on a non-pull request build
|
||||
exit 1
|
||||
fi
|
||||
|
||||
openssl aes-256-cbc -K "${encrypted_9a387195a62e_key}" -iv "${encrypted_9a387195a62e_iv}" -in travis-test-farm.pem.enc -out travis-test-farm.pem -d
|
||||
Binary file not shown.
@@ -274,3 +274,50 @@ commands =
|
||||
--acme-server={env:ACME_SERVER:pebble}
|
||||
passenv = DOCKER_*
|
||||
setenv = {[testenv:py27-oldest]setenv}
|
||||
|
||||
[testenv:travis-test-farm-tests-base]
|
||||
changedir = tests/letstest
|
||||
commands =
|
||||
./travis-setup.sh
|
||||
deps = -rtests/letstest/requirements.txt
|
||||
passenv =
|
||||
AWS_*
|
||||
TRAVIS_*
|
||||
encrypted_*
|
||||
setenv = AWS_DEFAULT_REGION=us-east-1
|
||||
|
||||
[testenv:travis-test-farm-apache2]
|
||||
changedir = {[testenv:travis-test-farm-tests-base]changedir}
|
||||
commands =
|
||||
{[testenv:travis-test-farm-tests-base]commands}
|
||||
python multitester.py apache2_targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_apache2.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} --fast
|
||||
deps = {[testenv:travis-test-farm-tests-base]deps}
|
||||
passenv = {[testenv:travis-test-farm-tests-base]passenv}
|
||||
setenv = {[testenv:travis-test-farm-tests-base]setenv}
|
||||
|
||||
[testenv:travis-test-farm-leauto-upgrades]
|
||||
changedir = {[testenv:travis-test-farm-tests-base]changedir}
|
||||
commands =
|
||||
{[testenv:travis-test-farm-tests-base]commands}
|
||||
python multitester.py targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_leauto_upgrades.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} --fast
|
||||
deps = {[testenv:travis-test-farm-tests-base]deps}
|
||||
passenv = {[testenv:travis-test-farm-tests-base]passenv}
|
||||
setenv = {[testenv:travis-test-farm-tests-base]setenv}
|
||||
|
||||
[testenv:travis-test-farm-certonly-standalone]
|
||||
changedir = {[testenv:travis-test-farm-tests-base]changedir}
|
||||
commands =
|
||||
{[testenv:travis-test-farm-tests-base]commands}
|
||||
python multitester.py targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_letsencrypt_auto_certonly_standalone.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} --fast
|
||||
deps = {[testenv:travis-test-farm-tests-base]deps}
|
||||
passenv = {[testenv:travis-test-farm-tests-base]passenv}
|
||||
setenv = {[testenv:travis-test-farm-tests-base]setenv}
|
||||
|
||||
[testenv:travis-test-farm-sdists]
|
||||
changedir = {[testenv:travis-test-farm-tests-base]changedir}
|
||||
commands =
|
||||
{[testenv:travis-test-farm-tests-base]commands}
|
||||
python multitester.py targets.yaml travis-test-farm.pem SET_BY_ENV scripts/test_sdists.sh --repo {env:TRAVIS_BUILD_DIR} --branch {env:TRAVIS_BRANCH} --fast
|
||||
deps = {[testenv:travis-test-farm-tests-base]deps}
|
||||
passenv = {[testenv:travis-test-farm-tests-base]passenv}
|
||||
setenv = {[testenv:travis-test-farm-tests-base]setenv}
|
||||
|
||||
Reference in New Issue
Block a user