1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00
Commit Graph

283 Commits

Author SHA1 Message Date
Brad Warren
cd2edeff1b Fix test farm tests (#6335)
* update CentOS AMI ids

* Remove assumption of usable default subnet
2018-09-05 13:12:05 -07:00
Brad Warren
6e23b81dba Separate integration (#5814)
Main piece of #5810.

* Rename Certbot integration tests

* Remove nginx from certbot tests

* allow for running individual integration tests

* fail under 65

* Add set -e

* Track Nginx coverage and omit it from report later.

* Use INTEGRATION_TEST in script

* add INTEGRATION_TEST=all

* update min certbot percentage
2018-08-29 14:11:13 -07:00
Adrien Ferrand
b1003b7250 Fail fast during tests if python executable is not in the PATH (#6306) 2018-08-16 12:28:25 -07:00
Brad Warren
783b6e4746 Automate EBS cleanup (#6160)
* ensure volume cleanup

* remove volume cleanup

* cleanup function and output
2018-07-17 17:19:04 -07:00
Brad Warren
3316eac178 Separate integration coverage (#6113)
* check coverage separately

* Add coverage minimums for integration tests.
2018-06-15 09:55:16 -07:00
Brad Warren
da6320f4d1 Stop testing against Debian 7. (#6077)
Debian Wheezy is no longer supported (see https://wiki.debian.org/LTS) and
Amazon shut down their Debian 7 mirrors so let's stop trying to use Debian 7
during testing.
2018-06-07 11:11:06 +03:00
schoen
e2d6faa8a9 Add --reuse-key feature (#5901)
* Initial work on new version of --reuse-key

* Test for reuse_key

* Make lint happier

* Also test a non-dry-run reuse_key renewal

* Test --reuse-key in boulder integration test

* Better reuse-key integration testing

* Log fact that key was reused

* Test that the certificates themselves are different

* Change "oldkeypath" to "old_keypath"

* Simply appearance of new-key generation logic

* Reorganize new-key logic

* Move awk logic into TotalAndDistinctLines function

* After refactor, there's now explicit None rather than missing param

* Indicate for MyPy that key can be None

* Actually import the Optional type

* magic_typing is too magical for pylint

* Remove --no-reuse-key option

* Correct pylint test disable
2018-06-01 15:21:02 -07:00
Jacob Hoffman-Andrews
a03c68fc83 Clean up boulder-fetch a bit. (#6032)
The value for FAKE_DNS is now always the same because Boulder's
docker-compose hardcodes it, so skip some sed.

Set a time limit on how long we'll wait for boulder to come up.
2018-05-24 10:53:21 -07:00
Jacob Hoffman-Andrews
4304ff0d62 Bring up just the boulder container. (#6031)
Boulder recently added a "netaccess" container which may conflict.
2018-05-23 11:33:21 -07:00
Quang Vu
cfd4b8f363 #4242 Support multi emails register (#5994)
This change will allow registering/updating account with multi emails.
Detail is enclosed in #4242

* support multi emails register

* add more test cases

* update test to unregister before register

* update create path to support multi emaill

* refactor payload updating

* fix typo

* move command line doc to another place

* revert the change for updating account registration info, added unit test

* rearrange text for consistency
2018-05-22 15:32:44 -07:00
Brad Warren
c9a206ca89 Get mypy passing with check_untyped_defs everywhere (#6021)
* unchecked_typed_defs everywhere

* fix mypy for lock_test

* add magic_typing

* fix mypy in letshelp

* fix validator errors in compat test

* fix mypy for test_driver.py

* fix mypy in util.py

* delint
2018-05-21 20:23:21 -07:00
pdamodaran
20418cdd68 Fixed #5859 (#6011) 2018-05-17 06:52:11 -07:00
Brad Warren
726f3ce8b3 Remove EOL'd Ubuntu from targets.yaml (#5887)
See https://wiki.ubuntu.com/Releases.

Ubuntu 15.* repositories have been shut down for months now causing our tests
to always fail on these systems. While the tests on Ubuntu 12.04 still work, it
has been unsupported by Canonical for almost a year and I don't think we should
hamstring ourselves trying to continue to support it ourselves.
2018-04-19 17:57:41 -07:00
Brad Warren
a9e01ade4c Revert "use older boulder version (#5852)" (#5855)
This reverts commit 6b29d159a2.
2018-04-17 17:17:15 -07:00
Brad Warren
6b29d159a2 use older boulder version (#5852) 2018-04-11 16:14:55 -07:00
Brad Warren
cc24b4e40a Fix --allow-subset-of-names (#5690)
* Remove aauthzr instance variable

* If domain begins with fail, fail the challenge.

* test --allow-subset-of-names

* Fix renewal and add extra check

* test after hook checks
2018-03-08 11:12:33 -08:00
Brad Warren
d62c56f9c9 Remove the assumption the domain is unique in the manual plugin (#5670)
* use entire achall as key

* Add manual cleanup hook

* use manual cleanup hook
2018-03-06 07:21:01 -08:00
Brad Warren
cee9ac586e Don't report coverage on Apache during integration tests (#5669)
* ignore Apache coverage

* drop min coverage to 67
2018-03-06 07:20:34 -08:00
Brad Warren
559220c2ef Add basic ACMEv2 integration tests (#5635)
* Use newer boulder config

* Use ACMEv2 endpoint if requested

* Add v2 integration tests

* Work with unset variables

* Add wildcard issuance test

* quote domains
2018-03-01 10:11:15 -08:00
Brad Warren
38d5144fff Drop min coverage to 63 (#5641) 2018-03-01 08:25:32 -08:00
Brad Warren
43ba9cbf33 Merge pull request #5605 from certbot/rm-eol-2.6
Drop Python 2.6 and 3.3 support
2018-02-26 13:34:50 -08:00
Hugo
42638afc75 Drop support for EOL Python 2.6 and 3.3
* Drop support for EOL Python 2.6

* Use more helpful assertIn/NotIn instead of assertTrue/False

* Drop support for EOL Python 3.3

* Remove redundant Python 3.3 code

* Restore code for RHEL 6 and virtualenv for Py2.7

* Revert pipstrap.py to upstream

* Merge py26_packages and non_py26_packages into all_packages

* Revert changes to *-auto in root

* Update by calling letsencrypt-auto-source/build.py

* Revert permissions for pipstrap.py
2018-02-16 16:14:01 -08:00
cclauss
09b5927e6a from botocore.exceptions import ClientError (#5507)
Fixes undefined name 'botocore' in flake8 testing of https://github.com/certbot/certbot

$ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__
```
./tests/letstest/multitester.py:144:12: F821 undefined name 'botocore'
    except botocore.exceptions.ClientError as e:
           ^
1     F821 undefined name 'botocore'
```
2018-02-15 11:07:35 -08:00
Joona Hoikkala
fbace69b5e Fix install verb (#5536)
* Fix install verb

* Fix error message, tests and remove global pylint change

* Fix boulder integration test keypath

* Also use chain_path from lineage if not defined on CLI
2018-02-14 09:28:36 -08:00
Brad Warren
0416382633 Update leauto_upgrades with tests from #5402. (#5407) 2018-02-06 17:01:58 -08:00
Brad Warren
a2239baa45 fix test_tests.sh (#5478) 2018-01-24 22:38:36 -08:00
Brad Warren
3acf5d1ef9 Fix rebootstraping with old venvs (#5392)
* Fix rebootstrapping before venv move

* add regression test

* dedupe test

* Cleanup case when two venvs exist.

* Add clarifying comment

* Add double venv test to leauto_upgrades

* Fix logic with the help of coffee

* redirect stderr

* pass VENV_PATH through sudo

* redirect stderr
2018-01-10 12:10:21 -08:00
Brad Warren
e02adec26b 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
2018-01-08 17:38:03 -08:00
Brad Warren
24ddc65cd4 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.
2018-01-08 17:02:20 -08:00
Jacob Hoffman-Andrews
73ba9af442 Don't echo Boulder logs on failure. (#5290)
The extensive logs made it hard to spot the actual failure.
2017-12-04 11:20:53 -08:00
Brad Warren
48173ed1cb Switch from nose to pytest (#5282)
* Use pipstrap to install a good version of pip

* Use pytest in cb-auto tests

* Remove nose usage in auto_test.py

* remove nose dev dep

* use pytest in test_tests

* Use pytest in tox

* Update dev dependency pinnings

* remove nose multiprocess lines

* Use pytest for coverage

* Use older py and pytest for old python versions

* Add test for Error.__str__

* pin pytest in oldest test

* Fix tests for DNS-DO plugin on py26

* Work around bug for Python 3.3

* Clarify dockerfile comments
2017-12-01 10:59:55 -08:00
Brad Warren
884fc56a3e Use pipstrap to ensure pip works on older systems (#5216)
* Use pipstrap in tools/_venv_common.sh

* Use _venv_common.sh in test_sdists
2017-11-03 10:59:56 -07:00
Brad Warren
7c11158810 Retry failures to start boulder (#5176)
Occasionally a network error prevents Docker from starting boulder causing
Travis tests to fail like it did at
https://travis-ci.org/certbot/certbot/jobs/282923098. This works around the
problem by using travis_retry to try to start boulder again if it fails.

This also moves the logic of waiting for boulder to start into
tests/boulder-fetch.sh so people running integration tests locally can benefit.
2017-10-12 17:00:13 -07:00
Brad Warren
1081a2501f integration test to prevent regressions of #5115 (#5172) 2017-10-11 08:18:17 -07:00
yomna
3087b436f3 Delete after revoke [#4109] (#4914)
*     Switching from old branch (issue-4109) and addressing changes requested
    in last iteration of review:
    80aa857fd2

    Requested changes that were addressed:
    - fixed outdated docstring for `cert_path_to_lineage`
    - removed `full_archive_dir_from_renewal_conf` amd replaced with `full_archive_path` (and `_full_archive_path` -> `full_archive_path`)
    - matching on `cert` instead of `chain` in `cert_manager.cert_path_to_lineage`
    - fixed the two coding wrongs make a right issue

    Requested changes which were not addressed:
    - moving `cert_path_to_lineage` from `cert_manager` to `storage`,
      as it would introduce a hard to resolve circular dependency.

* Update integration tests to handle default deletion after revoke.

* Swapping test domains.

* Addressing PR feedback:
	- calling storage.full_archive_path with a ConfigObj instead of None
	- Removing lambda x: x.chain_path as an option to match against

* Addressing PR feedback: it's expected that len(pattern) is 0, so handle that case properly.

* Testing of conflicting values of --cert-name and --cert-path non-interactive mode.

* Silly test for when neither certname nor cert-path were specified.

* Changing archive_files to a private function, because mocking nested functions seems impossible.

* Tests for storage.cert_path_for_cert_name

* Splitting out _acceptable_matches

* Some tests for cert_manager.cert_path_to_lineage

* Offerings to the Lint God

* Cleaner way of dealing with files in archive dirs

* Handling the two different use cases of match_and_check_overlaps a bit better

* late night syntax errors

* Test for when multiple lineages share an archive dir

* Tests for certbot.cert_manager.match_and_check_overlaps

* Removing unneeded nesting

* Lint errors that Travis caught that didn't show up locally

* Adding two integration tests (matching & mismatched --cert-path, --cert-name)  based on feedback.

* Asking the user if they want to delete in interactive mode.
2017-10-03 16:36:26 -07:00
Brad Warren
356471cdf6 Add hook directories (#5151)
* Add hook dir constants

* Add hook dir properties to configuration

* test hook dir properties

* reuse certbot.util.is_exe

* Add certbot.hooks.list_hooks

* test list_hooks

* Run pre-hooks in directory

* Run deploy-hooks in directory

* Run post-hooks in directory

* Refactor and update certbot/tests/hook_test.py

* Add integration tests for hook directories

* Have Certbot create hook directories.

* document renewal hook directories

* Add --no-directory-hooks

* Make minor note about locale independent sorting
2017-10-03 13:52:02 -07:00
Brad Warren
34d78ff626 Fix hook test. (#5152)
Up until now, this test was written incorrectly. In addition, when it has
failed, it simply prints error messages rather than reporting that the test
failed. This fixes both of these problems.
2017-10-02 13:20:35 -07:00
yomna
48fd7ee260 Updating the AWS letstest documentation (#5091)
* Better documentation for working w/ AWS.

* Addressing feedback.

* profile name -> key name
2017-09-19 10:25:36 -07:00
Brad Warren
4bc0c83ca7 Add --no-self-upgrade to test farm test. (#5095) 2017-09-14 17:33:32 -07:00
Brad Warren
68283940cd Test farm improvements (#5088)
* prevent regressions of #5082

* Fix test_leauto_upgrades.sh

test_leauto_upgrades.sh has been incorrectly been succeeding because while peep
doesn't work with newer versions of pip and letsencrypt-auto would crash,
the output included the version number so we reported the test as passing.
This updates letsencrypt-auto to the oldest version that still works for the
purpose of the test and sets pipefail so errors are properly reported.

* Test symlink creation in test_leauto_upgrades.sh

* Pin dependencies in test_sdists.sh.

* Fix permissions errors in test_tests.sh
2017-09-07 17:54:40 -07:00
Brad Warren
4c19d19cf5 Test that deploy and renew hooks are saved right
It is important that both renew and deploy hooks are saved as renew_hook in
renewal configuration files to preserve forwards compatibility.
2017-06-30 11:30:21 -04:00
Brad Warren
6dedfa62b6 Test renew and deploy hooks are run properly 2017-06-30 11:06:51 -04:00
Brad Warren
03f6c6d0e5 Bump min integration test coverage to 64 (#4868) 2017-06-21 21:08:37 -07:00
Brad Warren
3cb92d33eb report and enforce coverage on integration tests (#4854) 2017-06-21 14:10:16 -07:00
Brad Warren
93f094a86e Test additional subcommands in integration tests (#4855)
* Test additional subcommands

* Test rollback

* quote original variable

* Specifically set installer to work around #4858.
2017-06-21 13:49:15 -07:00
Brad Warren
e0f3c05c02 Fix test_apache2.sh test farm test. (#4786)
tools/venv.sh cannot be used as the tests run on systems with Python 2.6 and
tools/venv.sh installs code that is not compatible with Python 2.6.
2017-06-06 15:48:00 -07:00
Brad Warren
0e4f55982a Remove unused readlink environment variable. (#4781)
The program readlink used to be used in integration tests so an environment
variable was used to handle differences in the executable on different systems.
This command is no longer used though so the variable can be removed.
2017-06-05 15:20:04 -07:00
Brad Warren
791fea43ec Add regression/system test for #4719 (#4739)
* Add regression/system test for #4719.

* Test for regressions with --help and invalid args.

* Handle expected failure properly.
2017-06-01 09:57:27 -07:00
Brad Warren
4a0c336484 modification-check.sh now fails if a command fails (#4746) 2017-05-26 14:41:59 -07:00
Brad Warren
8c29cb0810 Force nginx tests to run during CI (#4558)
* force nginx tests to run during CI

* offer default value
2017-05-16 12:19:07 -07:00