Commit graph

36 commits

Author SHA1 Message Date
Martin Vrachev
b42ca297e5 Remove PIPE arg and make QuiteHandler the default
Passing a pipe to the subprocess, but not reading from it
conceals helpful error messages.
As the code redirects all of the stderr from the subprocess
to nowhere, the error output of the process is never read.
If we remove the PIPEs from the tests we should see some
error messages on the console/logger that can
help us understand what went wrong.

On another hand, when we stop passing stderr=subprocess.PIPE arg
to the subprocess.Popen function call there are a lot of
HTTP messages together with the helpful error messages.
One decision is to make QuietHTTPRequestHandler
the default. That way we receive the helpful error messages
without the HTTP messages.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
2020-05-07 15:53:01 +03:00
Joshua Lock
292b18926b Use __name__ for loggers, per convention
Replace hard-coded logger names with __name__. For the most part this just uses
the standard conventions to create the same logger hierarchy as existed before.
The only real difference is that loggers created for printing during tests are
no longer part of the 'tuf' hierarchy.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-03-03 10:36:39 +00:00
lixuefeng (Cloud)
5f891e81c8 just format
Signed-off-by: lixuefeng (Cloud) <li.xuefeng@h3c.com>
2019-09-17 13:11:48 +02:00
Vladimir Diaz
22fa7f72a3
Modify URL comparison in test_arbitrary_package_attack.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-20 10:58:23 -04:00
Vladimir Diaz
2b1095fb98
Use replace('\', '/') in test_arbitrary_package_attack.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-19 10:48:19 -04:00
Vladimir Diaz
24a0cec633
Update unit tests affected by change to target filepaths
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-06 13:18:33 -04:00
Vladimir Diaz
8f65fa4154
Rename license files in modules
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-02-05 11:31:19 -05:00
Vladimir Diaz
ec95a0d30f
Resolve conflicts
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:53:57 -05:00
Vladimir Diaz
334bf3ca12
Update integration tests following map file changes
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-12-08 16:32:06 -05:00
Vladimir Diaz
64fb960c00
Fix incorrect use of json.dumps
All optional parameters to json.dumps() are now keyword-only in Python 3.6.  Although this is the error that's flag, the tests use of json.dumps is actually incorrect: it should write the json.dumps with write()
2017-12-08 16:23:20 -05:00
Vladimir Diaz
e904ccb957
Remove py26 conditional import statements 2017-12-08 16:23:19 -05:00
Vladimir Diaz
f2514bdc4d
Add copyright and license to test-related files
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2017-11-30 13:33:11 -05:00
Vladimir Diaz
20d7cd2ac8
Fix incorrect use of json.dumps
All optional parameters to json.dumps() are now keyword-only in Python 3.6.  Although this is the error that's flag, the tests use of json.dumps is actually incorrect: it should write the json.dumps with write()
2017-09-22 11:04:47 -04:00
Vladimir Diaz
72d7ebfd8d
Remove py26 conditional import statements 2017-09-21 17:16:29 -04:00
Vladimir Diaz
90155962a7 Fix unit tests to use tuf.settings.repositories_directory 2017-02-06 16:19:58 -05:00
Vladimir Diaz
3ebf76182d Fix imports statements in test_arbitrary_package_attack.py 2017-01-11 16:41:13 -05:00
Vladimir Diaz
b1367430d7 Replace instances of tufformats in test modules 2016-11-09 17:10:05 -05:00
Vladimir Diaz
5d14de8a61 Merge branch 'tuf_merge' of https://github.com/baloyan/tuf into baloyan-tuf_merge
Conflicts:
	tests/test_formats.py
	tests/test_updater.py
	tuf/client/updater.py
	tuf/formats.py
	tuf/repository_lib.py
2016-11-09 14:32:59 -05:00
Vladimir Diaz
c65129ad7e Update tests following rename of target() 2016-11-07 12:33:08 -05:00
Artiom Baloian
299ff68edd Now crypto related files are in ssl_crypto and ssl_commons 2016-11-02 17:44:32 -04:00
Artiom Baloian
b0156944bb Moved util.py, now it is common 2016-11-02 09:49:37 -04:00
Artiom Baloian
b793c81739 Added simple_settings, now it is a requirement of TuF.
Rename conf.py into the settings.py an changed import call.
2016-11-01 15:38:40 -04:00
Artiom Baloian
8247a02737 Moved TuF exceptions and schem into the ssl_commons 2016-10-31 11:58:05 -04:00
Artiom Baloian
7098cdbc3a Move _vendor dir and split formats into the formats and tufformats 2016-10-28 18:37:28 -04:00
Vladimir Diaz
b03deee874 Modify the way slow retrieval errors are raised and detected.
Potential slow retrieval errors are raised for safe downloads (strict check on file size) and not for unsafe (a file size less than an upper limit).  Slow retrieval errors should always be prevented
2016-10-10 17:34:00 -04:00
Vladimir Diaz
9c659b633c Clear keydb and roledb (using the 'clear_all' argument) in the teardown() calls of unit tests 2016-07-15 13:53:31 -04:00
Vladimir Diaz
70cc1b8abd Clear roledb and keydb of 'test_repository' entries after each test case 2016-07-11 13:53:16 -04:00
Vladimir Diaz
47471db40f Add import statements for unvendored dependencies in the unit tests 2015-06-02 10:28:02 -04:00
Vladimir Diaz
0c6b360952 Add missing test conditions for test_repository_lib.py and minor edits to modules. 2014-06-11 11:29:00 -04:00
Vladimir Diaz
74c0120ed4 Increase sleep time after starting simple server in integration tests. 2014-06-10 09:26:09 -04:00
vladdd
17b230abdd Support Python 2.6. 2014-06-06 18:57:23 -04:00
vladdd
6b8b2399a2 Finish unit tests for Python2 + 3 support.
All unit tests updated / running for Python 2 + 3.
TODO: Fix non-Python 3 issue with util.py.
2014-05-27 13:55:48 -04:00
Vladimir Diaz
ab95a4b3aa [WIP] Python 2+3 support.
Python 2+3 unicode.
libraries.
The following modules (and their tests) work in PY2.7+3.3:
keydb, hash, formats, mirrors
2014-04-29 14:27:34 -04:00
Vladimir Diaz
a7f28b9af4 [WIP] Python 2+3 support.
Add six, convert PY <=2.5 exception handling, dictionary iteration, libraries, 1/2 the tests.
2014-04-22 15:03:42 -04:00
vladdd
08a2bad2c0 Add Travis CI, coveralls, and coverage-related updates. 2014-04-20 16:15:19 -04:00
vladdd
5f94d5be0d Support ISO 8601, vendor iso8601, clean codebase. 2014-04-19 14:27:53 -04:00
Renamed from tests/integration/test_arbitrary_package_attack.py (Browse further)