* testenv/test-auth-both.py: Add qop parameter for digest auth
* testenv/test-auth-digest.py: Same
* testenv/conf/authentication.py: Support additional parameters for
authentication
* testenv/servers/http/http_server.py: Same
* testenv/Makefile.am: added new test 'Test-hsts.py'.
* testenv/Test-hsts.py: new test for HSTS.
* testenv/conf/domains.py: new hook to override domain list.
* testenv/test/base_test.py: (__init__): new optional parameter
for tests 'req_protocols'.
(get_domain_addr): set the instance variables 'addr' and 'port'.
Return address as an array (domain, port) instead of string.
(gen_cmd_line): take into account domain and port.
* testenv/test/http_test.py (__init__): new optional parameter
'req_protocols'.
(setup): new function. Call to server_setup() decoupled from
begin() and moved here.
(begin): call to superclass to maintain backward compatibility.
Removed call to server_setup().
This patch adds a new parameter to the test suite called 'req_protocols',
and a new function called 'setup'. The ability for tests to be able to set some
extra parameters such as the actual requested protocols (with 'req_protocols')
became obvious when support for HSTS was added to Wget, where the requested URI
and the actual executed URI do not have to be the same. This new parameter is optional
and if not specified, the test suite behaves as before. Also, the new function 'setup'
is provided as a means to start the test HTTP server, but not launch the test yet
(this is done when calling 'begin', as usual), in case we want to query the address
and port in which the test server listens. If 'setup' is not called, it is automatically
invoked when calling 'begin'. With these measures, we preserve backward-compatibility with
existing tests.
* testenv/README: Describe how to use repeated header name.
* testenv/server/http/http_server.py (finish_headers): Send all
values from list if the header value is a Python list.
* configure.ac: Export WITH_SSL for use in Makefile.am
* testenv/Makefile.am: Add HTTPS tests to XFAIL_TESTS when !WITH_SSL
Reported-by: Ander Juaristi <ajuaristi@gmx.es>
* testenv/test/base_test.py: Use Valgrind SSL suppressions file for
tests
* testenv/valgrind-suppression-ssl, tests/valgrind-suppression-ssl:
Add new suppression files to suppress OpenSSL errors in valgrind
* tests/test-proxied-https-auth.px: Use the valgrind SSL
suppressions file for the test
* tests/test-proxied-https-auth-keepalive.px: Same
* src/exc/server_error.py: Add exception for GET to HEAD fallback.
* src/server/http/http_server.py: Do not send body if 304 return
code requested for a file.
* testenv/Test-reserved-chars.py: New file.
* testenv/Makefile.am: Added new test Test-reserved-chars.py.
When following redirections, Wget should not unescape the reserved
characters that might appear in target URLs.
* testenv/conf/{__init__,authentication,files_crawled,
hook_sample,reject_header,server_files}.py: Aesthetic changes to
meet Python PEP8 guidelines
* testenv/exc/{server_error,test_failed}.py: Same
* testenv/misc/{colour_terminal,wget_file}.py: Same
* testenv/server/http/http_server.py: Same
* testenv/test/base_test.py: Same
We would like to override existing headers in the response from the
server to allow the test cases to define their own headers. This patch
allows this behaviour through the use of the add_header() method while
also allowing sending multiple headers of the same name.
* testenv/Makefile.am: Register the new test.
* testenv/Test--convert-links--content-on-error.py: Add test case for
the combination of --convert-links and --content-on-error.py.
* testenv/exc/server_error.py: Try writing file content for GET
request even if there is a Response rule present.
* testenv/server/http/http_server.py: Likewise.
* testenv/server/http/http_server.py(BaseTest): Add docstring; use raw
string for regex.
* testenv/server/http/http_server.py(_Handler): Typo fix.
* testenv/conf/server_files.py(ServerFiles): Code style change for
readability plus another typo fix.
This reverts commit fcd3b3c473.
Turns out that removing the ChangeLog files causes the Wget build to
fail. While this issue is investigated and sorted out, the commit is
reversed to allow people to be able to build Wget from master
From v1.16.1 onwards, Wget no longer maintains an active ChangeLog file.
Instead the ChangeLog will be automatically generated on each release
through gnulib's gitlog-to-changelog script. However, the old versions
of the ChangeLog files are retained for reference. These files are
renamed with a .pre-gitlog appended to their filenames.
Also removed ChangeLog.README file which is not required anymore
This patch also adds support for multiple challenges per
WWW-Authenticate header line.
The test Test-auth-both.py now succeeds and thus is taken away
from XFAIL_TESTS (expected to fail tests).
Add (lots) of documentation for various parts of the test suite in the
form of Python docstrings. Also, clean up some of the redundant code and
fix indentation issues.
The server_conf hook and the server_sett() methods were no longer
required. The server configuration is currently being done by
server_conf() method in the server.
Some command line switches are passed to Wget unconditionally. These
switches should exist in a single place instead of being redundantly
defined in each test file. We add the following two switches by default
here:
1. --debug: This causes wget to be most verbose and output a lot of
debugging information. Hence, if a test fails, the test log should
provide valuable information.
2. --no-config: Users may have their own wgetrc files on the system.
However, for the tests, we want Wget to run with vanilla settings.
Hence, disbale loading any config files.
This is a squashed commit of the following from parallel-wget:
ecd6977 Refactor mainly the test cases classes
d26c8eb Create package test for test case classes
507383d Move server classes to package server.protocol
195393b Create package conf where rules and hooks are put
42e482a Create package exc and move TestFailed to exc
82f44f3 Fix a typo in Test-Proto.py
31e5f33 From WgetTest.py move WgetFile to misc
422171d Create package misc, move ColourTerm.py to misc