Commit graph

9632 commits

Author SHA1 Message Date
Brad Warren
19309355fa test it 2020-02-25 10:37:44 -08:00
Erica Portnoy
d46b561930 Sometimes the dict location will be None in which case we should in fact return None 2020-02-14 14:48:59 -08:00
Erica Portnoy
2864de6185 Switch from property to method for openssl and add tests for coverage. 2020-02-14 14:28:48 -08:00
Erica Portnoy
707511006c Remove subprocess import and reference in test 2020-02-14 13:58:34 -08:00
Erica Portnoy
8858c67ef3 Remove one more implementation assumption from our tests 2020-02-14 13:03:15 -08:00
Erica Portnoy
36fbd2e449 Add mocks to tests 2020-02-14 12:57:56 -08:00
Erica Portnoy
84e067dac9 Clean up more apache tests 2020-02-13 18:42:57 -08:00
Erica Portnoy
f10059d2c6 Merge branch 'master' into apache-session-tix 2020-02-13 18:23:59 -08:00
Erica Portnoy
19396380a1 Reformat remaining apache tests with modules dict syntax 2020-02-13 18:19:08 -08:00
Erica Portnoy
1949953289 Remove extraneous imports 2020-02-13 18:15:43 -08:00
Erica Portnoy
524dc16075 Remove extraneous ability to pass in openssl version, and install ssl options conf again after enabling ssl module 2020-02-13 18:13:32 -08:00
Erica Portnoy
fb0bd9300c don't use strings 2020-02-13 17:28:32 -08:00
Erica Portnoy
6c75064318 debian override still needs os 2020-02-13 17:05:29 -08:00
Erica Portnoy
01b4918b5b Remove os imports 2020-02-13 17:01:05 -08:00
Erica Portnoy
dc671b4231 Merge branch 'apache-session-tix' of github.com:certbot/certbot into apache-session-tix 2020-02-13 16:52:38 -08:00
Erica Portnoy
6b9837f69a Check OpenSSL version 2020-02-13 16:51:32 -08:00
Adrien Ferrand
fc7e5e8e60
Remove useless pylint error suppression directives (#7657)
As pylint is evolving, it improves its accuracy, and several pylint error suppression (`# pylint: disable=ERROR) added in certbot codebase months or years ago are not needed anymore to make it happy.

There is a (disabled by default) pylint error to detect the useless suppressions (pylint-ception: `useless-suppression`). It is not working perfectly (it has also false-positives ...) but it is a good start to clean the codebase.

This PR removes several of these useless suppressions as detected by the current pylint version we use.

* Remove useless suppress

* Remove useless lines
2020-02-13 13:56:16 -08:00
Erica Portnoy
ea160c2350 Check OpenSSL version 2020-02-12 17:39:08 -08:00
m0namon
bcaee66b0a
Merge pull request #7766 from certbot/min-pyparsing-version
Clarify the minimum pyparsing version
2020-02-12 13:26:10 -08:00
Erica Portnoy
d0e64328df Add mechanism for selecting apache config file, based on work done in #7191. 2020-02-11 18:31:38 -08:00
Brad Warren
7d540fc33a update pyparsing comment 2020-02-11 14:44:37 -08:00
Brad Warren
605ef40656 Remove duplicate pyparsing pin 2020-02-11 14:20:29 -08:00
Brad Warren
b8856ac810
Fix unpinned tests (#7760)
Our nightly tests failed last night due to a new release of `virtualenv` and `pip`'s lack of dependency resolution: https://travis-ci.com/certbot/certbot/jobs/285797857#L280. It looks like we were not the only ones affected by this problem: https://github.com/pypa/virtualenv/issues/1551

This fixes the problem by using `-I` to skip the logic where `pip` decides a dependency is already satisfied and has it reinstall/update the packages passed to `pip` and all of their dependencies.

You can see our nightly tests passing with this change at https://github.com/certbot/certbot/runs/439231061.
2020-02-11 12:05:29 -08:00
Brad Warren
02bf7d7dfc
Print script output in case of a failure. (#7759)
These tests failed at https://travis-ci.com/certbot/certbot/jobs/285202481 but do not include any output from the script about what went wrong because the string created from `subprocess.CalledProcessError` does not include value of output.

This PR fixes that by printing these values which `pytest` will include in the output if the test fails.
2020-02-10 11:01:17 -08:00
Joona Hoikkala
e6f050dbe9
Move ocsp.py to public api (#7744)
We should move ocsp.py to public API, as an upcoming OCSP prefetching functionality in Apache plugin relies on it, and as the plugins are note released in lockstep with the Certbot core, we need to be careful when changing those APIs.

* Move ocsp.py to public api

* Fix type annotations, move to pointing to an interface and fix linting

* Add certbot.ocsp to documentation table of contents

* Modify tests to reflect the changes in ocsp.py

* Add changelog entry

* Fix notAfter mock for tests
2020-02-10 09:52:42 -08:00
Brad Warren
5607025e9b
Really remove old docs link from README (#7758) 2020-02-07 12:58:15 -08:00
Brad Warren
7cc6cf2604
Remove link to letsencrypt readthedocs (#7757)
After a brief discussion in Mattermost, I shut down letsencrypt.readthedocs.io. Turns out we were linking to it in our README here so let's remove the broken link.

I didn't update the link to point to one of the readthedocs projects we still have because are main Certbot docs are self-hosted rather than being on readthedocs.
2020-02-07 11:04:07 -08:00
Brad Warren
86a6cc53cf
Remove text that certbot.tests.utils isn't public (#7754) 2020-02-07 09:08:41 +01:00
Brad Warren
1859fb059d
Don't display todo comments in docs (#7753)
Currently if you go to https://certbot.eff.org/docs/api/certbot.crypto_util.html, there is a todo comment displayed at the top of the page. These todos were written for developers, not users, so I do not think they should be shown from our documentation.

This PR makes the quick and easy fix of configuring Sphinx not to show these todo items. I created #7752 to track removing all of these todos from our docstrings and disabling the Sphinx todo extension.

* Set todo_include_todos=False in sphinx-quickstart

* Remove todos from existing docs.
2020-02-06 15:39:47 -08:00
ohemorange
c5a2ba03da
Merge pull request #7735 from certbot/apache-parser-v2
[Apache v2] Merge apache-parser-v2 feature branch back to master
2020-02-06 15:29:28 -08:00
schoen
995e70542a
Merge pull request #7738 from osirisinferi/nginx-hostname
[nginx] Parse $hostname in `server_name`
2020-02-06 14:44:03 -08:00
OsirisInferi
4f80f8b910
Fixing existing tests 2020-02-06 21:24:25 +01:00
OsirisInferi
0e03f82733
Remove todo:: 2020-02-06 21:12:17 +01:00
OsirisInferi
5035a510a2
Add test for $hostname parsing 2020-02-06 21:10:41 +01:00
Adrien Ferrand
ef388a309f
Merge pull request #7751 from Pilifer/master
Don't verify certificate in HTTP01Response.simple_verify (certbot#6614)
2020-02-06 16:58:39 +01:00
Filip Lajszczak
c98183c998 restore CHANGELOG in root directory 2020-02-06 15:27:20 +00:00
Filip Lajszczak
2b051dd197 Merge branch 'master' of https://github.com/certbot/certbot 2020-02-06 15:14:17 +00:00
Brad Warren
7da5196206
Add triggers for only a single CI system (#7748)
* Configure travis-test to only run on Travis.

* Configure azure-test to only run on Azure.

* Add docs and comments to keep it up-to-date.
2020-02-05 23:49:01 +01:00
Brad Warren
cc764b65c1
Set recreate = true in tox.ini. (#7746)
Fixes #7745.
2020-02-05 14:37:39 -08:00
Adrien Ferrand
7b35abbcb4
Windows installer integration tests (#7724)
As discussed in #7539, we need proper tests of the Windows installer itself in order to variety that all the logic contained in a production-grade runtime of Certbot on Windows is correctly setup by each version of the installer, and so for a variety of Windows OSes. 

This PR handles this requirement. The new `windows_installer_integration_tests` module in `certbot-ci` will:
* run the given Windows installer
* check that Certbot is properly installed and working
* check that the scheduled renew task is set up
* check that the scheduled task actually launch the Certbot renew logic

The Windows nightly tests are updated accordingly, in order to have the tests run on Windows Server 2012R2, 2016 and 2019.

These tests will evolve as we add more logic on the installer. 

* Configure an integration test testing the windows installer

* Write the test module

* Configurable installer path, prepare azure pipelines

* Fix option

* Update test_main.py

* Add confirmation for this destructive test

* Use regex to validate certbot --version output

* Explicit dependency on a log output

* Use an exception to ask confirmation

* Use --allow-persistent-changes
2020-02-05 14:12:29 -08:00
Brad Warren
6601d03ce8
Merge pull request #7743 from certbot/candidate-1.2.0
Candidate 1.2.0
2020-02-05 13:48:51 -08:00
m0namon
1a2189f4df
Merge pull request #7729 from certbot/fix-nginx-typo
Fix a typo in Nginx
2020-02-04 17:00:13 -08:00
Erica Portnoy
6a4b610269 Bump version to 1.3.0 2020-02-04 14:01:04 -08:00
Erica Portnoy
97ae63efa6 Add contents to certbot/CHANGELOG.md for next version 2020-02-04 14:01:03 -08:00
Erica Portnoy
3907b53b4b
Release 1.2.0 2020-02-04 14:01:02 -08:00
Erica Portnoy
6c5959d892 Update changelog for 1.2.0 release 2020-02-04 13:46:57 -08:00
OsirisInferi
9b35dbf2be
Forgot to remove a breakpoint() statement 2020-02-02 22:31:05 +01:00
OsirisInferi
05e35ff2e0
Add CHANGELOG entry 2020-02-02 21:59:03 +01:00
OsirisInferi
7d0651c315
Parse $hostname in server_name 2020-02-02 21:56:09 +01:00
Brad Warren
174fa0e05c
Turn off Travis notifications in test branches. (#7733)
When I want to manually run the full test suite to test something, I've been manually deleting our notification setup from `.travis.yml` to avoid spamming IRC with my personal test failures.

This PR sets this behavior up to happen automatically by turning off IRC notifications in test branches. You can see this working by noticing the IRC notification section in the bottom of the config for this PR at https://travis-ci.com/certbot/certbot/builds/146827907/config and the fact that it is absent from a `test-` branch based on this one at https://travis-ci.com/certbot/certbot/jobs/282059094/config.
2020-01-30 13:26:39 -08:00