Commit graph

95 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
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
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
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
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
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
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
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
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
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
Craig Smith
fe358600ab Add cleanup trap to integration test script (#4075)
The integration test script spins up Python webservers. This trap will
ensure that those webservers are shutdown at exit.
2017-01-18 10:41:53 -08:00
Blake Griffith
49d46ef99a Impelment account deactivation [revision requested] (#3571)
Impelment account deactivation
2017-01-17 16:00:07 -08:00
Craig Smith
94c23479e2 Add option to specify revocation reason (#3242) (#3988)
This includes two new tests in the integration test script to check that
boulder gets the correct code. The encoding is specified in RFC5280
5.3.1. The codes that boulder will accept are a subset of that,
specified in `boulder.revocation.reasons.go`.
2017-01-11 18:26:55 -08:00
Brad Warren
05afb54522 Fix and cleanup CheckHooks 2017-01-04 13:39:46 -08:00
Brad Warren
7fb4e6627c HOOK_TEST++ 2017-01-04 13:12:50 -08:00
Brad Warren
42b0188519 Merge branch 'master' into save-more-hooks 2017-01-04 12:24:53 -08:00
Brad Warren
39f5551305 Merge the manual and script plugins (#3890)
* Start of combined manual/script plugin

* Return str from hooks.execute, not bytes

* finish manual/script rewrite

* delete old manual and script plugins

* manually specify we want chall.token

* use consistent quotes

* specify chall for uri

* s/script/hook

* fix spacing on instructions

* remove unneeded response argument

* make achall more helpful

* simplify perform

* remove old test files

* add start of manual_tests

* fix ParseTest.test_help

* stop using manual_test_mode in cli tests

* Revert "make achall more helpful"

This reverts commit 54b01cea30.

* use bad response/validation methods on achalls

* simplify perform and cleanup environment

* finish manual tests

* Add HTTP manual hook integration test

* add manual http scripts

* Add manual DNS script integration test

* remove references to the script plugin

* they're hooks, not scripts

* add --manual-public-ip-logging-ok to integration tests

* use --pref-chall for dns integration

* does dns work?

* validate hooks

* test hook validation

* Revert "does dns work?"

This reverts commit 1224cc2961.

* busy wait in manual-http-auth

* remove DNS script test for now

* Fix challenge prefix and add trailing .

* Add comment about universal_newlines

* Fix typo from 0464ba2c4

* fix nits and typos

* Generalize HookCOmmandNotFound error

* Add verify_exe_exists

* Don't duplicate code in hooks.py

* Revert changes to hooks.py

* Use consistent hook error messages
2016-12-22 08:24:08 -08:00
Peter Eckersley
0c2dc60484 Integration tests for hooks 2016-12-15 17:28:16 -08:00
Brad Warren
a5df9e5a0e Only verify required ports are available (#3608)
* only verify port is available when you actually need it

* refactor code to create achalls

* Test port checks are based on achall

* test that only the port for the requested challenge is checked in standalone
2016-10-10 18:44:39 -07:00
Ben Irving
61b77766c2 Add integration test cases for must staple and ECDSA (#3158) 2016-06-14 11:28:29 -07:00
sagi
b54497d814 Fix chain filename 2016-05-24 19:33:13 +00:00
sagi
c0228ef1aa Boulder integration scripts provides a cert_path 2016-05-16 22:11:15 +00:00
Brad Warren
75a1d81458 More stray ncrypt reference cleanup 2016-04-14 17:04:23 -07:00
Brad Warren
ae6f1c62f1 Rename misc files 2016-04-14 10:20:23 -07:00
Kane York
902ab9afdf Work around leap day bug in parsedatetime 2016-02-29 10:58:14 -08:00
Peter Eckersley
0513af83f4 Test CLI flag setting from renewal integration tests
Closes: #2411
2016-02-09 16:09:02 -08:00
Brad Warren
0fa61f4192 Use common and add verb 2016-02-08 18:46:24 -08:00
Brad Warren
2170c8d7d2 Move * outside of " 2016-02-08 18:35:44 -08:00
Brad Warren
e798b62d2e Testing cleanup 2016-02-08 18:18:48 -08:00
Brad Warren
7a902daa9f duplication-- 2016-02-08 18:14:29 -08:00
Brad Warren
8eb889d942 Make CheckCertCount check cert counts 2016-02-08 17:55:28 -08:00
Brad Warren
38a6d44279 Remove round echos 2016-02-08 17:54:39 -08:00
Brad Warren
bb2f054f1b Take boulder-integration.sh from #2398 2016-02-08 17:54:02 -08:00