Commit graph

52 commits

Author SHA1 Message Date
Sebastien Awwad
dad9f9f11b
test: extend sleep in testing after spawning server processes
This adds to PR #799; please see that for details.  In short,
tests sometimes fail on slow test systems (primarily on AppVeyor)
if we don't have long enough delays.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-11-06 09:59:24 -05:00
Sebastien Awwad
d199610f94
DOC: Clarify and correct comments on download timeouts
and call out need for more testing in a comment.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-10 16:30:32 -04:00
Sebastien Awwad
2f87821136
Test: mark slow retrieval test failure as expected...
until a fix has been provided. This results from PR 781. See
comments: https://github.com/theupdateframework/tuf/pull/781

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-10 16:30:32 -04:00
Sebastien Awwad
a8debd7cc6
Test: improve failure behavior of test_slow_retrieval_attack
and also clarify setup workflow in test_slow_retrieval_attack.

Because the test was written incorrectly, the test was failing
with a bad hash error after 31 seconds, when it should instead
have been failing because the slow retrieval attack was not
averted.

In particular, a target file was updated, but metadata was not
correctly updated on the repository and, further, the client's
copy of the metadata was never updated. (The client continued
to expect 31 bytes of target file instead of 400 or 800.)

The way the test used to run, the target file change
previously had no purpose.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-10 16:30:32 -04:00
Sebastien Awwad
411c0de33e
minor: better use of junk variable in test_slow_retrieval_attack
Also halves the duration of a failed test (from 800s to 400s).
Otherwise, this is a code-style-only change.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
2018-09-10 16:30:31 -04:00
Trishank K Kuppusamy
b9bc8602c2
Update TUF to handle HTTPS proxies
Signed-off-by: Trishank K Kuppusamy <trishank.kuppusamy@datadoghq.com>
2018-08-31 13:18:35 -04:00
Vladimir Diaz
6c41983054
Fix URL comparison in test_slow_retrieval_attack.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-23 10:58:04 -04:00
Vladimir Diaz
9530e430e3
Modify URL comparison in test_slow_retrieval_attack.py
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-20 11:01:48 -04:00
Vladimir Diaz
42c97d7340
Edit test conditions affected by new settings
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-03-27 14:44:10 -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
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
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
9579a1a0d8 Fix import statements for test_slow_retrieval_attack.py 2017-01-12 15:23:53 -05:00
Vladimir Diaz
fb0ea0b836 Fix more import statements for various modules 2017-01-11 15:41:13 -05:00
Vladimir Diaz
f9660b4797 More import statementment replacements to various modules 2017-01-10 17:05:12 -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
70fc8dce36 Resolve merge conflicts with upstream and ecordell-root-versioning 2016-10-18 10:28:04 -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
feb2cd0df4 Update tests to improve code coverage and following the changes to repository write and backtracking 2016-09-15 15:24: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
2a9e4c28ad Add latest repository example and unit test fixes 2016-06-27 17:02:27 -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
003847e73f Improve code coverage for download.py 2015-04-02 16:37:47 -04:00
Vladimir Diaz
3eb8f10710 More coverage improvements 2015-03-02 15:10:27 -05:00
Vladimir Diaz
a57c97749a Fix test_download.py comments for the test case dealing with incorrect file lengths. 2014-06-17 13:45:42 -04:00
vladdd
19c69487b0 Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop 2014-06-06 18:57:32 -04:00
vladdd
17b230abdd Support Python 2.6. 2014-06-06 18:57:23 -04:00
Vladimir Diaz
1c1cd0f192 Update / fix remaining Python 2 + 3 doctests.
Remove test_slow_retrieval_attack.py print statements.
2014-06-06 08:37:31 -04:00
Vladimir Diaz
0e9a1de4b1 Merge branch 'develop' of https://github.com/vladimir-v-diaz/tuf into develop 2014-06-06 07:33:11 -04:00
Vladimir Diaz
091cfe9aeb Increase sleep time after starting simple server in affected tests. 2014-06-06 07:32:03 -04:00
vladdd
21bbbedbb8 Fix test_util.py test case failure in py2.7. 2014-06-05 19:09:45 -04:00
Vladimir Diaz
71b1d38c1b Update slow retrieval server and fix integration tests.
Update the slow retrieval server, integration tests, and the download module to address issues with unexpected exceptions and bytes.
2014-05-28 12:11:31 -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
vladdd
bc99524e2b Finish initial refactor of slow retrieval attack. 2014-05-13 12:53:50 -04:00
vladdd
e4bd9a7ba2 [WIP] Refactor download.py 2014-05-11 22:59:42 -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
7843bdd272 [WIP] Python 2+3 support.
Add six, convert PY <=2.5 exception handling, dictionary iteration, libraries, remaining 7/8 test modules.
2014-04-23 12:50:05 -04:00
vladdd
e0864ee3ab Update slow retrieval server and attack.
Ensure the target file used in the slow retrieval attack is larger than tuf.conf.SLOW_START_GRACE_PERIOD.  The previous size of the test file might have led to inconsistent triggering of a slow retrieval error.
2014-04-21 05:34:16 -04:00