Commit Graph
611 Commits
Author SHA1 Message Date
Brad WarrenandGitHub 364a6d8a2d Release 0.10.0 (#4022)
* Release 0.10.0

* Bump version to 0.11.0
2017-01-11 12:01:33 -08:00
Brad WarrenandGitHub 9c9004aff1 Stop IDisplay AssertionErrors (#4010)
Fixes #3996.

I'm pretty confident this PR solves the problem. I've audited all calls to IDisplay methods and the assertions done in certbot.display.util are now done in all our unit tests.

With that said, it wouldn't hurt to have someone else double check I didn't miss anything. The easiest way to do this is to grep for IDisplay in our code and ensure all calls to IDisplay methods are valid. This means every method call other than notification (because a notification call is always OK) either provides a value for default or force_interactive. This is defined in interfaces.py.

I've also been considering removing the assertion that's been causing us trouble here from our release. The only argument I have for not doing so is it may hinder 3rd party plugin development. When they use IDisplay, they have the same problem as we do with prompting users without a TTY. Not keeping this assertion in makes it more likely they won't notice the issue and Certbot will crash on an unsuspecting user.

With that said, none of our known 3rd party plugins use IDisplay at all.

* Provide force_interactive in _get_certname

* Use force_interactive when asking for webroot

* Factor IDisplay assertion into it's own function

* Add util.patch_get_utility()

* Allow custom path to patch_get_utiity

* Change GetEmailTest to use patch_get_utility

* Use new_callable to create new objects

* Modify tests to use patch_get_utility

* Improve FreezableMock documentation

* Add user facing error to TTY magic

* Comment out assert_valid_call

* Add test_input_assertion_fail2()
2017-01-10 16:25:33 -08:00
osirisinferiandPeter Eckersley f9b8933f37 Add line number to Augeas syntax error message (#3974)
* Add line number to Augeas syntax error message

* Use `format()` for message formatting

* Pleasing Python 2.6
2017-01-06 12:58:51 -08:00
Brad WarrenandGitHub 28ce10fef5 Don't add ServerAlias directives when the domain is already covered by a wildcard (#3917)
* correctly match * and ? in ServerAlias directives

* update Apache wildcard test

* Consolidate wildcard matching and remove bad test

* Test Apache vhost selection with wildcards

* Added few more tests to proof vhost selection
2016-12-20 15:53:52 -08:00
Brad WarrenandPeter Eckersley ae379568b1 Mitigate problems for people who run without -n (#3916)
* CLI flag for forcing interactivity

* add --force-interactive

* Add force_interactive error checking and tests

* Add force_interactive parameter to FileDisplay

* add _can_interact

* Add _return_default

* Add **unused_kwargs to NoninteractiveDisplay

* improve _return_default assertion

* Change IDisplay calls and write tests

* Document force_interactive in interfaces.py

* Don't force_interactive with a new prompt

* Warn when skipping an interaction for the first time

* add specific logger.debug message
2016-12-19 12:45:40 -08:00
Peter EckersleyandGitHub 59c602d9ca Parallalelise nosetests from tox (#3836)
* Parallalelise nosetests from tox

* Parallelise even more things, break even more things

* Now unbreak all the tests that aren't ready for ||ism

* Try to pass tests!

 - Remove non-working hack in reporter_test
 - also be selective about ||ism in the cover environment

* Try again

* certbot-apache tests also work, given enough time

* Nginx may need more time in Travis's cloud

* Unbreak reporter_test under ||ism

* More timeout

* Working again?

* This goes way faster

* Another big win

* Split a couple more large test suites

* A last improvement

* More ||ism!

* ||ise lint too

* Allow nosetests to figure out how many cores to use

* simplify merge

* Mark the new CLI tests as ||izable

* Simplify reporter_test changes

* Rationalise ||ism flags

* Re-up coverage

* Clean up reporter tests

* Stop modifying testdata during tests

* remove unused os
2016-12-06 20:39:16 -08:00
Blake GriffithandErica Portnoy 65d9e997e5 Refactor cli_test.py and main_test.py (#3828)
* Begin breaking out cli_test.py

* simplify main

* refactor porse tests

* move determine account tests to main_test.py

* move duplicate cert test to main_test.py

* move cli stuff out of the way

* add test_renewal.py

* move error test into error_handler_test.py

* move test_read_file

* move test_no_gui out of MainTest

* move test_install_abspath to parsetest

* Move main tests into main_test.py

* move cli tests back into cli_test.py

* clean up cli_test.py

* move punycode test to util_test.py

* Fix NameError from missing plugins_disco

* Fix linting errors

* test_renewal.py -> renewal_test.py

* rm not_cli_test.py

* Move main._handle_exception test to main_test.py

* Move renewal import in renewal_test.py

from @ohemorange comments

* certbot.tests.test_util -> certbot.tests.util

* Fix issues from rebasing.

* Fix testing issue with option_was_set

* fix linting issue
2016-12-05 15:22:14 -08:00
Nick FongandBrad Warren dd8772b608 Remove get_all_certs_keys() from Apache and Nginx (#3768)
- Remove get_all_certs_keys() implementation in
    - certbot-apache/certbot_apache/configurator.py
- Remove corresponding tests for get_all_certs_keys() in
    - certbot-apache/certbot_apache/tests/configurator_test.py
- Remove get_all_certs_keys() implementation in
    - certbot-nginx/certbot_nginx/configurator.py
    - certbot-nginx/certbot_nginx/parser.py
- Remove corresponding tests for get_all_certs_keys() in:
    - certbot-nginx/certbot_nginx/tests/configurator_test.py
    - certbot-nginx/certbot_nginx/tests/parser_test.py

Resolves #3762
2016-11-08 17:19:05 -08:00
Erica PortnoyandBrad Warren d54cb76432 Remove the curses dialog, thereby deprecating the --help and --dialog command line options (#3665)
* Remove the curses dialog, thereby deprecating the --help and --dialog command line options

* Deprecate --dialog and suppress --text
2016-10-21 15:45:57 -07:00
Brad WarrenandGitHub 6d0ba6de8e Fix Apache constants tests (#3630)
* Allow running constants_test.py individually

* Mock until tests pass

Mock out both functions used to determine the OS in
certbot_apache.tests.constants_test.
2016-10-13 13:54:22 -07:00
Brad WarrenandPeter Eckersley 76a92d4cde Release Certbot 0.9.0 (#3583)
* Release 0.9.0

* Bump version to 0.10.0
2016-10-05 10:13:28 -07:00
DanCld ed7c022565 Lint fix, space before parentheses 2016-08-22 08:16:20 +03:00
DanCld df68b44d38 Fix apache logs dir for centos 2016-08-21 21:50:14 +03:00
Peter Eckersley 7da7d47e8a Merge remote-tracking branch 'origin/master' into multi-topic-help 2016-08-12 17:40:49 -07:00
Joona Hoikkala 14f3710250 Added check for /files/ 2016-08-10 10:39:10 +03:00
Joona Hoikkala 51191c2ea5 Added linter exception 2016-08-10 01:50:40 +03:00
Joona Hoikkala 6c3ae10f9b Added test case 2016-08-10 01:39:53 +03:00
Joona Hoikkala f4948855f0 Added None check and according test 2016-08-10 01:24:21 +03:00
Joona Hoikkala c29e8c3332 Refactored get_file_path 2016-08-09 23:43:11 +03:00
Joona Hoikkala c346cdf2f3 Changed SUSE mod handling constant 2016-08-02 09:57:34 +03:00
Joona Hoikkala b891cac3dc Added suse constants 2016-07-31 01:10:28 +03:00
Joona Hoikkala 28fc02143b Remove enmod and dismod values as they are not needed 2016-07-30 11:59:58 +03:00
Joona Hoikkala 093ebd2f03 Tests 2016-07-30 11:49:04 +03:00
Joona Hoikkala c87282d5aa Un-debian the defaults 2016-07-30 10:44:46 +03:00
Joona Hoikkala a5859910e7 If os name is not found, try LIKE var from os-release 2016-07-30 10:43:38 +03:00
Ville Skyttä c7b89c334b Use logger.warning instead of deprecated warn 2016-07-22 09:54:28 +03:00
Ville Skyttä 86b287b338 Use assertEqual instead of deprecated assertEquals 2016-07-22 09:54:28 +03:00
Peter Eckersley a49d26f607 Merge remote-tracking branch 'origin/master' into multi-topic-help 2016-07-20 16:56:23 -07:00
Brad WarrenandGitHub 2e50b38b45 Merge pull request #3182 from certbot/issue_2983
Handle commas in apache filenames (Issue 2983)
2016-07-15 16:31:16 -07:00
Noah Swartz a4d38c8831 add file in sites-enabled so git doesn't throw it out 2016-07-11 14:32:00 -07:00
Noah Swartz 8f1a141d2a incorporate brad's comments 2016-07-11 13:20:31 -07:00
Blake Griffith 9bc50d4a47 Try to fix travis-ci lint failure 2016-07-11 12:44:21 -05:00
Peter EckersleyandGitHub c051826ea2 Merge pull request #3261 from certbot/apache-path-fallback
Apache plugin PATH fallback
2016-07-08 16:59:28 -07:00
Noah SwartzandGitHub 1fc84c83e2 Merge pull request #3234 from sagi/rewrite
Comment out corresponding RewriteConds for filtered RewriteRule
2016-07-08 16:06:26 -07:00
Noah Swartz 1bbfde1771 don't code while distracted 2016-07-08 15:35:29 -07:00
Noah Swartz d8c2dd1a5c add self 2016-07-08 15:28:12 -07:00
Noah Swartz 1113e28046 fix typo 2016-07-08 15:22:56 -07:00
Noah Swartz d4a8820bdc wrap with escapes 2016-07-08 15:04:44 -07:00
Peter Eckersley 0bedeb449a Refactor path_surgery into plugins.util so that nginx can call it 2016-07-08 14:03:21 -07:00
Peter Eckersley 757a8ddae7 Fixes & tests 2016-07-08 13:21:37 -07:00
Peter Eckersley cecac803a0 Do this more cleanly 2016-07-08 13:21:37 -07:00
Peter Eckersley a322f44f2b Implement PATH fallback for apachectl search 2016-07-08 13:21:37 -07:00
Peter Eckersley 754b7956b3 Make the error even more informative 2016-07-08 13:21:37 -07:00
Peter Eckersley c3244df951 more doc improvements 2016-07-08 10:12:57 -07:00
Peter Eckersley fd35a1c724 Explain why Apache [appears] not to be installed
Would help debug #3244
2016-07-06 12:43:48 -07:00
sagi 0e9622322a typo 2016-07-01 22:17:41 +00:00
sagi 7459360780 Add more test cases 2016-07-01 22:08:37 +00:00
sagi 15ba12ed46 Parsing State Machine + some tests 2016-07-01 21:06:16 +00:00
sagi a9abc7b39e typo 2016-07-01 15:17:37 +00:00
Peter Eckersley 7b50960ac0 Address review comments 2016-06-29 13:57:58 -07:00