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

268 Commits

Author SHA1 Message Date
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
Yen Chi Hsuan
51ae69698d Allow boulder-fetch.sh run with ip from iproute2 (#4620) 2017-05-05 08:49:54 -07:00
Brad Warren
5ca8f7c5b9 Add lockfile (#4449)
* add lock_file

* cleanup lock file

* Add LockFile tests

* add lock_dir

* add lock_dir_until_exit

* add set_up_core_dir and move lock_dir_until_exit

* Move lock_and_call to certbot.test.util

* Add lock to Apache

* Add lock to the Nginx plugin

* Improve permissions error message

* sort plugins

* add test_prepare_order

* provide more actionable permissions error

* Document and catch use of OSError

* don't lock a directory twice

* add conditional dependency on ordereddict

* Add lock_test

* expand sorted plugins comment

* Add lock_test to lint

* make make_lineage more conventional and flexible

* enhance lock_test.py

* add lock_test to tox

* Readd success message

* make py26 happy

* add test_acquire_without_deletion
2017-05-01 14:49:12 -07:00
Yen Chi Hsuan
29d25f0915 Enable boulder tests on Python 3 2017-04-15 02:32:18 +08:00
Jacob Hoffman-Andrews
d5f1edf2bb Dump Boulder logs on integration test failures. (#4442)
Might help debug #4363.

Also:

make "bash" vs "sh" explicit
move the paranoia flags (-ex) from the shebang into the body
add -u (fail on unset variables)
change _common to work with -u
remove some env vars that were no longer used
remove shebang from _common.sh because it's meant to be sourced, not run
2017-03-29 16:48:08 -07:00
Yen Chi Hsuan
6fb78dab67 Fix Docker IP detection with different ifconfig output formats (#4376) 2017-03-29 13:34:09 -07:00
Brad Warren
5e6a6f51d3 Fix test_leauto_upgrades.sh (#4278)
* fix-test-leauto-upgrades

* redirect stderr

* redirect stderr part 2
2017-03-02 10:31:37 -08:00
Brad Warren
0d8a4b4ebd Make mod-check more flexible (#4268)
* fixes #4166

* Run mod-check from anywhere

* pass TRAVIS_BRANCH through in tox
2017-02-28 15:17:07 -08:00
Erica Portnoy
52ce335ff0 lineage_for_certname should return None if there is no existing renewal file (#4243)
* lineage_for_certname should return None if there is no existing renewal file

* add unit test

* add regression test to integration test

* revent boulder-start to boulder-fetch
2017-02-23 18:31:23 -08:00
Jacob Hoffman-Andrews
ebf5170d12 Update testing docs. (#4211)
Recommend faster-running commands with clearer output first, building up to
slow, noisy, `tox` last.

Remove outdated Boulder testing advice, and outdated Boulder testing scripts
(Vagrantfile, mac-bootstrap.sh, boulder-start.sh). Update Boulder testing
section.

Fill out "directory structure" section of contributing guide a little better.
2017-02-16 12:39:17 -08:00
Jacob Hoffman-Andrews
94aa562cf2 Use latest Boulder for Travis tests. (#4180) 2017-02-14 21:19:18 -08:00
Brad Warren
7f3c732bbf Cleanup test farm tests and add test_sdists (#4089)
* add get_certbot_version.sh

* Use get_certbot_version.sh in build.py

* make test_leauto_upgrades.sh more robust

* auto upgrades break tests

* OCSP experimental is not needed anymore

* Add test_sdists.sh

* Use LE_AUTO_VERSION, not repo version

* install OS deps earlier

* use readlink not realpath

* undo changes to build.py

* Factor out version code from build.py

* Use version.py in test_sdists

* Remove get_certbot_version

* workaround setuptools breakage
2017-01-30 19:37:23 -08:00
Josh Soref
6a39a42f45 Spelling (#4101)
* spelling: action

* spelling: artifacts

* spelling: asymmetric

* spelling: attempts

* spelling: bizarre

* spelling: certbot

* spelling: certificate

* spelling: certainly

* spelling: challenge

* spelling: client

* spelling: collated

* spelling: correct

* spelling: considered

* spelling: custom

* spelling: distinguish

* spelling: encoding

* spelling: enhancement

* spelling: equivalent

* spelling: execution

* spelling: existence

* spelling: failed

* spelling: handshake

* spelling: hyphen

* spelling: initialized

* spelling: initialization

* spelling: interpretation

* spelling: letsencrypt

* spelling: multiline

* spelling: multipart

* spelling: necessary

* spelling: otherwise

* spelling: output

* spelling: overridden

* spelling: positives

* spelling: preferable

* spelling: progress

* spelling: recommended

* spelling: referring

* spelling: relativity

* spelling: request

* spelling: requiring

* spelling: separate

* spelling: source

* spelling: specified

* spelling: standard

* spelling: successfully

* spelling: unparseable

* spelling: useful
2017-01-26 16:21:54 -08:00
Brad Warren
fe03c5a14c fix integration tests (#4111) 2017-01-26 14:08:22 -08:00
Brad Warren
4d860b37b0 Preserve preferred-challenges on renewal (#4112)
* use challenge type strings, not objectS

* Factor out parse_preferred_challenges

* restore pref_challs

* save pref_challs

* Make CheckCertCount more flexible

* improve integration tests

* Make pref_challs more flexible
2017-01-25 18:40:22 -08:00
Brad Warren
44f2d4aa20 Fix modification-check.sh (#4091)
* Run build.py

* Restore letsencrypt-auto after running build

* Remove temp_dir before exiting

* add missing $
2017-01-24 14:37:41 -08:00