Compare commits

...

24 Commits

Author SHA1 Message Date
Brad Warren
6bd7f73f81 Merge branch 'revert-fix-macos-pytest' into test-revert-fix-macos-pytest 2018-04-11 17:08:59 -07:00
Brad Warren
06c9043ba9 remove oldest passenv 2018-04-11 17:08:53 -07:00
Brad Warren
e0394c6551 no merge and quiet 2018-04-11 17:00:31 -07:00
Brad Warren
328a710393 Merge branch 'revert-fix-macos-pytest' into test-revert-fix-macos-pytest 2018-04-11 16:59:30 -07:00
Brad Warren
e4062efd9f Revert "Fix pytest on macOS in Travis (#5360)"
This reverts commit 5388842e5b.
2018-04-11 16:58:41 -07:00
ohemorange
9defbc3aed Add before_install to all tests running on test-everything (#5806)
* add before_install to all tests running on test-everything

* actually always run before_install

* also don't override addons

* only install libaugeas0 for docker_dev
2018-03-29 17:18:15 -07:00
Brad Warren
f1461946b8 Merge pull request #5688 from certbot/update-test-everything
Update the test-everything branch
2018-03-11 15:45:14 -07:00
Brad Warren
b7472fb337 Merge branch 'master' into update-test-everything 2018-03-08 11:30:09 -08:00
Brad Warren
937e27db28 Merge branch 'master' into update-test-everything 2018-03-07 15:57:07 -08:00
Brad Warren
e64137fb53 Merge pull request #5668 from certbot/update-test-everything
Fix merge conflicts and add more ACMEv2 integration tests
2018-03-06 09:19:25 -08:00
Brad Warren
a0dc7dafda add python3 ACMEv2 integration tests 2018-03-05 12:02:05 -08:00
Brad Warren
02975c84d9 set up nginx-oldest integration tests 2018-03-05 12:01:26 -08:00
Brad Warren
5307600a03 use v1 for clarity 2018-03-05 12:00:44 -08:00
Brad Warren
b0ce7529aa Merge branch 'master' into update-test-everything 2018-03-05 12:00:07 -08:00
Joona Hoikkala
5abec9fa3c Python3 now installed as default let's upgrade instead of trying to install (#5665) 2018-03-05 10:01:46 -08:00
Brad Warren
8753959bb3 Merge pull request #5645 from certbot/update-test-everything
Update the test-everything branch
2018-03-02 11:17:01 -08:00
Brad Warren
184b384b58 Merge branch 'master' into update-test-everything 2018-03-01 10:21:55 -08:00
Brad Warren
13b6b3f1b3 Merge pull request #5401 from certbot/fix-everything
Fix test-everything
2018-01-09 18:33:13 -08:00
Brad Warren
f4a1547481 Merge branch 'master' into fix-everything 2018-01-09 17:33:17 -08:00
Brad Warren
164121fc15 Revert "Update test-everything (#5397)"
This reverts commit 349643c9b8.
2018-01-09 17:32:07 -08:00
Brad Warren
349643c9b8 Update test-everything (#5397)
* Use josepy instead of acme.jose. (#5203)

* Parse variables without whitespace separator correctly in CentOS family of distributions (#5318)

* Pin josepy in letsencrypt-auto (#5321)

* pin josepy in le-auto

* Put pinned versions in sorted order

* Pin dependencies in oldest tests (#5316)

* Add tools/merge_requirements.py

* Revert "Fix oldest tests by pinning Google DNS deps (#5000)"

This reverts commit f68fba2be2.

* Add tools/oldest_constraints.txt

* Remove oldest constraints from tox.ini

* Rename dev constraints file

* Update tools/pip_install.sh

* Update install_and_test.sh

* Fix pip_install.sh

* Don't cat when you can cp

* Add ng-httpsclient to dev constraints for oldest tests

* Bump tested setuptools version

* Update dev_constraints comment

* Better document oldest dependencies

* test against oldest versions we say we require

* Update dev constraints

* Properly handle empty lines

* Update constraints gen in pip_install

* Remove duplicated zope.component

* Reduce pyasn1-modules dependency

* Remove blank line

* pin back google-api-python-client

* pin back uritemplate

* pin josepy for oldest tests

* Undo changes to install_and_test.sh

* Update install_and_test.sh description

* use split instead of partition

* More pip dependency resolution workarounds (#5339)

* remove pyopenssl and six deps

* remove outdated tox.ini dep requirement

* Fix auto_tests on systems with new bootstrappers (#5348)

* Fix pytest on macOS in Travis (#5360)

* Add tools/pytest.sh

* pass TRAVIS through in tox.ini

* Use tools/pytest.sh to run pytest

* Add quiet to pytest.ini

* ignore pytest cache

* print as a string (#5359)

* Use apache2ctl modules for Gentoo systems. (#5349)

* Do not call Apache binary for module reset in cleanup()

* Use apache2ctl modules for Gentoo

* Broader git ignore for pytest cache files (#5361)

Make gitignore take pytest cache directories in to account, even if
they reside in subdirectories.

If pytest is run for a certain module, ie. `pytest certbot-apache` the
cache directory is created under `certbot-apache` directory.

* Fix letsencrypt-auto name and long forms of -n (#5375)

* Deprecate Python2.6 by using Python3 on CentOS/RHEL 6 (#5329)

* If there's no python or there's only python2.6 on red hat systems, install python3

* Always check for python2.6

* address style, documentation, nits

* factor out all initialization code

* fix up python version return value when no python installed

* add no python error and exit

* document DeterminePythonVersion parameters

* build letsencrypt-auto

* close brace

* build leauto

* fix syntax errors

* set USE_PYTHON_3 for all cases

* rip out NOCRASH

* replace NOCRASH, update LE_PYTHON set logic

* use built-in venv for py3

* switch to LE_PYTHON not affecting bootstrap selection and not overwriting LE_PYTHON

* python3ify fetch.py

* get fetch.py working with python2 and 3

* don't verify server certificates in fetch.py HttpsGetter

* Use SSLContext and an environment variable so that our tests continue to never verify server certificates.

* typo

* build

* remove commented out code

* address review comments

* add documentation for YES_FLAG and QUIET_FLAG

* Add tests to centos6 Dockerfile to make sure we install python3 if and only if appropriate to do so.

* Allow non-interactive revocation without deleting certificates (#5386)

* Add --delete-after-revoke flags

* Use delete_after_revoke value

* Add delete_after_revoke unit tests

* Add integration tests for delete-after-revoke.

* Have letsencrypt-auto do a real upgrade in leauto-upgrades option 2 (#5390)

* Make leauto_upgrades do a real upgrade

* Cleanup vars and output

* Sleep until the server is ready

* add simple_http_server.py

* Use a randomly assigned port

* s/realpath/readlink

* wait for server before getting port

* s/localhost/all interfaces

* update Apache ciphersuites (#5383)

* Fix macOS builds for Python2.7 in Travis (#5378)

* Add OSX Python2 tests

* Make sure python2 is originating from homebrew on macOS

* Upgrade the already installed python2 instead of trying to reinstall
2018-01-09 17:24:14 -08:00
Brad Warren
899b56514a Merge pull request #5315 from certbot/update-test-everything
Update the test everything branch
2017-12-08 17:48:21 -08:00
Brad Warren
fa3bc6d774 Merge branch 'master' into test-everything 2017-12-08 16:37:28 -08:00
Jacob Hoffman-Andrews
76f5f590ea Add back macOS and Boulder for test-everything.
This commit should not be merged to master (if that happens, just revert it).

In https://github.com/certbot/certbot/pull/5270, we removed the macOS and
most Boulder integration tests from .travis.yml because they made builds very
slow. We still want to run those tests nightly, though. The test-everything
branch will have the tests that are too expensive to run for every PR.
2017-12-01 16:12:44 -08:00
6 changed files with 67 additions and 65 deletions

View File

@@ -5,7 +5,11 @@ cache:
- $HOME/.cache/pip
before_install:
- '([ $TRAVIS_OS_NAME == linux ] && dpkg -s libaugeas0) || (brew update && brew install augeas python3 && brew upgrade python && brew link python)'
# In the test-everything branch, we merge master before running tests.
# This is because we want test-everything to test the code in master nightly
# in a Travis cron, but with a different set of tests than master has
# in .travis.yml.
- '([ $TRAVIS_OS_NAME == linux ] && dpkg -s libaugeas0) || (brew update && brew install augeas && brew upgrade python python3 && brew link python)'
before_script:
- 'if [ $TRAVIS_OS_NAME = osx ] ; then ulimit -n 1024 ; fi'
@@ -13,7 +17,15 @@ before_script:
matrix:
include:
- python: "2.7"
env: TOXENV=py27_install BOULDER_INTEGRATION=v1
env: TOXENV=cover FYI="this also tests py27"
- python: "2.7"
env: TOXENV=lint
- python: "2.7"
env: TOXENV=py27-nginx-oldest BOULDER_INTEGRATION=v1
sudo: required
services: docker
- python: "2.7"
env: TOXENV=py27-nginx-oldest BOULDER_INTEGRATION=v2
sudo: required
services: docker
- python: "2.7"
@@ -21,41 +33,71 @@ matrix:
sudo: required
services: docker
- python: "2.7"
env: TOXENV=cover FYI="this also tests py27"
- sudo: required
env: TOXENV=nginx_compat
env: TOXENV=py27_install BOULDER_INTEGRATION=v1
sudo: required
services: docker
before_install:
addons:
- python: "2.7"
env: TOXENV=lint
- python: "2.7"
env: TOXENV='py27-{acme,apache,certbot,dns,nginx}-oldest'
sudo: required
services: docker
- python: "3.4"
env: TOXENV=py34
sudo: required
services: docker
- python: "3.6"
env: TOXENV=py36
sudo: required
services: docker
env: TOXENV='py27-{acme,apache,certbot,dns}-oldest'
- sudo: required
env: TOXENV=apache_compat
services: docker
before_install:
addons:
- sudo: required
env: TOXENV=nginx_compat
services: docker
- sudo: required
env: TOXENV=le_auto_precise
services: docker
- sudo: required
env: TOXENV=le_auto_trusty
services: docker
before_install:
- sudo: required
env: TOXENV=le_auto_wheezy
services: docker
- sudo: required
env: TOXENV=le_auto_centos6
services: docker
- sudo: required
env: TOXENV=docker_dev
services: docker
addons:
apt:
packages: # don't install nginx and apache
- libaugeas0
- python: "2.7"
env: TOXENV=apacheconftest
sudo: required
- python: "3.4"
env: TOXENV=py34 BOULDER_INTEGRATION=v1
sudo: required
services: docker
- python: "3.4"
env: TOXENV=py34 BOULDER_INTEGRATION=v2
sudo: required
services: docker
- python: "3.5"
env: TOXENV=py35 BOULDER_INTEGRATION=v1
sudo: required
services: docker
- python: "3.5"
env: TOXENV=py35 BOULDER_INTEGRATION=v2
sudo: required
services: docker
- python: "3.6"
env: TOXENV=py36 BOULDER_INTEGRATION=v1
sudo: required
services: docker
- python: "3.6"
env: TOXENV=py36 BOULDER_INTEGRATION=v2
sudo: required
services: docker
- python: "2.7"
env: TOXENV=nginxroundtrip
- language: generic
env: TOXENV=py27
os: osx
- language: generic
env: TOXENV=py36
os: osx
# Only build pushes to the master branch, PRs, and branches beginning with
@@ -100,9 +142,3 @@ after_success: '[ "$TOXENV" == "cover" ] && coveralls'
notifications:
email: false
irc:
channels:
- secure: "SGWZl3ownKx9xKVV2VnGt7DqkTmutJ89oJV9tjKhSs84kLijU6EYdPnllqISpfHMTxXflNZuxtGo0wTDYHXBuZL47w1O32W6nzuXdra5zC+i4sYQwYULUsyfOv9gJX8zWAULiK0Z3r0oho45U+FR5ZN6TPCidi8/eGU+EEPwaAw="
on_success: never
on_failure: always
use_notice: true

View File

@@ -1,2 +0,0 @@
[pytest]
addopts = --quiet

View File

@@ -19,5 +19,5 @@ for requirement in "$@" ; do
if [ $pkg = "." ]; then
pkg="certbot"
fi
"$(dirname $0)/pytest.sh" --pyargs $pkg
pytest --numprocesses auto --quiet --pyargs $pkg
done

View File

@@ -1,15 +0,0 @@
#!/bin/bash
# Runs pytest with the provided arguments, adding --numprocesses to the command
# line. This argument is set to "auto" if the environmnent variable TRAVIS is
# not set, otherwise, it is set to 2. This works around
# https://github.com/pytest-dev/pytest-xdist/issues/9. Currently every Travis
# environnment provides two cores. See
# https://docs.travis-ci.com/user/reference/overview/#Virtualization-environments.
if ${TRAVIS:-false}; then
NUMPROCESSES="2"
else
NUMPROCESSES="auto"
fi
pytest --numprocesses "$NUMPROCESSES" "$@"

View File

@@ -51,8 +51,7 @@ cover () {
fi
pkg_dir=$(echo "$1" | tr _ -)
pytest="$(dirname $0)/tools/pytest.sh"
"$pytest" --cov "$pkg_dir" --cov-append --cov-report= --pyargs "$1"
pytest --cov "$pkg_dir" --cov-append --cov-report= --numprocesses auto --pyargs "$1"
coverage report --fail-under="$min" --include="$pkg_dir/*" --show-missing
}

16
tox.ini
View File

@@ -60,8 +60,6 @@ commands =
setenv =
PYTHONPATH = {toxinidir}
PYTHONHASHSEED = 0
passenv =
TRAVIS
[testenv:py27-oldest]
commands =
@@ -69,40 +67,30 @@ commands =
setenv =
{[testenv]setenv}
CERTBOT_OLDEST=1
passenv =
{[testenv]passenv}
[testenv:py27-acme-oldest]
commands =
{[base]install_and_test} acme[dev]
setenv =
{[testenv:py27-oldest]setenv}
passenv =
{[testenv:py27-oldest]passenv}
[testenv:py27-apache-oldest]
commands =
{[base]install_and_test} certbot-apache
setenv =
{[testenv:py27-oldest]setenv}
passenv =
{[testenv:py27-oldest]passenv}
[testenv:py27-certbot-oldest]
commands =
{[base]install_and_test} .[dev]
setenv =
{[testenv:py27-oldest]setenv}
passenv =
{[testenv:py27-oldest]passenv}
[testenv:py27-dns-oldest]
commands =
{[base]install_and_test} {[base]dns_packages}
setenv =
{[testenv:py27-oldest]setenv}
passenv =
{[testenv:py27-oldest]passenv}
[testenv:py27-nginx-oldest]
commands =
@@ -110,8 +98,6 @@ commands =
python tests/lock_test.py
setenv =
{[testenv:py27-oldest]setenv}
passenv =
{[testenv:py27-oldest]passenv}
[testenv:py27_install]
basepython = python2.7
@@ -123,8 +109,6 @@ basepython = python2.7
commands =
{[base]install_packages}
./tox.cover.sh
passenv =
{[testenv]passenv}
[testenv:lint]
basepython = python2.7