Vladimir Diaz
e018c76c1e
Finish test cases for the methods of Targets().
2014-04-10 11:34:40 -04:00
Vladimir Diaz
666bb7ba9e
Update repository_tool.py.
...
Add remaining test cases for the methods of repository_tool.Metadata().
Add test case for repository_tool.Repository.get_filepaths_in_directory().
2014-04-09 12:43:31 -04:00
Vladimir Diaz
81c2748859
Add test cases (skeleton) for remaining methods of test_repository_tool.py.
2014-04-08 15:19:40 -04:00
Vladimir Diaz
af8d2fb98e
Finish remaining test cases for repository_tool.py functions.
2014-04-08 14:56:39 -04:00
Vladimir Diaz
4ad679062f
Continue updating test_repository_tool.py.
...
Add test cases for the generate_*_metadata() functions.
2014-04-08 12:31:06 -04:00
vladdd
0f3cdd9f61
Continue updating test_repository_tool.py.
...
Add test cases for the crypto funtions (e.g., generate_and_write_ed25519_keypair()).
Add test case for get_metadata_filenames().
Add test case for get_metadata_fileinfo().
Add setUpClass() and tearDownClass().
Update affected functions that failed testing, and any that needed modifying (such as util.py).
2014-04-07 20:21:39 -04:00
vladdd
ddd8b6bfd0
Add test_repository_tool.py
...
Add 'test_repository_tool.py' (initial incomplete commit)
Add test cases for the top-level metadata objects (Root(), Targets(), etc.)
Add test case for Repository()
Add test case for get_target_hash()
Minor update to 'repository_tool.py': add default rolename for Targets() and call tuf.util.get_target_hash() in the
repository tool's get_target_hash()
2014-04-07 15:28:46 -04:00
vladdd
5755207fae
Refactor test_extraneous_dependencies_attack.py.
...
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Modify the previous scenario
simulated for the mix-and-match attack. The metadata that specified the
dependencies of a project modified (previously a text file.)
2014-04-06 21:28:42 -04:00
vladdd
75a7124bb1
Refactor test_mix_and_match_attack.py.
...
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Modify the previous scenario
simulated for the mix-and-match attack.
2014-04-06 16:17:14 -04:00
vladdd
714df40e2d
Refactor test_slow_retrieval_server.py.
...
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Expanded comments and modified
previous setup.
Minor edits to slow_retrieval_server.py.
Add missing else clauses (to detect when TUF fails to prevent an attack) for a couple of the integrations tests.
2014-04-05 21:21:10 -04:00
vladdd
ba19cd7b72
Refactor test_replay_attack.py.
...
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Expanded comments.
2014-04-05 15:27:27 -04:00
Vladimir Diaz
9d2a5e2927
Minor edit to comment in test_indefinite_freeze_attack.py.
2014-04-03 12:35:16 -04:00
Vladimir Diaz
053e2b0ebe
Update test_indefinite_freeze_attack.py
...
Minor edit to comment.
Disable console log messages enabled by the repository tool, which this unit tests needs.
Sleep for at least 1 minute before checking for an expired metadata error, and ensure the function supplied to self.assertraises() is a callable.
2014-04-03 12:30:43 -04:00
Vladimir Diaz
b52194cdf4
Refactor test_endless_data_attack.py
...
Refactored 'test_endless_data_attack.py' to use the 'unittest' module (test
conditions in code, rather than verifying text output), use pre-generated
repository files, and discontinue use of the old repository tools. Minor
edits to the test cases.
2014-04-03 11:59:50 -04:00
Vladimir Diaz
63afb1e99f
Re-add repository data for the tests.
2014-04-03 08:52:16 -04:00
Vladimir Diaz
c44c7de280
Merge branch 'develop' of https://github.com/theupdateframework/tuf into refactor_test_indefinite_freeze_attack
2014-04-03 08:48:57 -04:00
Vladimir Diaz
6f7ac62ac4
Resolve Merge.
2014-04-03 08:32:45 -04:00
Vladimir Diaz
685187eae1
Remove old 'tuf/tests/unit/test_repository' directory.
2014-04-03 08:19:29 -04:00
Vladimir Diaz
2112816f97
Merge pull request #192 from vladimir-v-diaz/refactor_test_arbitrary_package_attacks
...
Refactor test_arbitrary_package_attack.
2014-04-03 08:15:52 -04:00
Vladimir Diaz
92905345e4
Minor edits to comments.
2014-04-02 11:50:48 -04:00
Vladimir Diaz
1ca98367d6
Initial refactor of test_indefinite_freeze_attack.py
2014-04-01 15:30:59 -04:00
Vladimir Diaz
b7047f7ea2
Edit comments and minor code cleanup.
...
Edit test_arbitrary_package_attack.py
2014-04-01 08:33:23 -04:00
Vladimir Diaz
8d1ef5bbfc
Merge branch 'add_test_cases_to_test_util' of https://github.com/vladimir-v-diaz/tuf into add_test_cases_to_test_util
2014-04-01 07:42:07 -04:00
vladdd
55941d7551
Refactor test_arbitrary_package_attack.
...
Refactored to use the 'unittest' module (test conditions in code, rather
than verifying text output), use pre-generated repository files, and
discontinue use of the old repository tools. Fix for issue #111 .
2014-03-31 18:28:54 -04:00
vladdd
68d3b5c1e1
Move repository data to 'tuf/tests/repository_data'
2014-03-31 17:29:53 -04:00
vladdd
dfa19b221e
Add missing test cases to test_util.py.
...
Add missing test cases for the following functions:
get_target_hash()
find_delegated_role()
paths_are_consistent_with_hash_prefixes()
ensure_all_targets_allowed()
Add test condition to test_B6_load_json_string().
2014-03-22 14:47:24 -04:00
vladdd
d28311b8ec
Remove obsolete helper functions.
...
Minor edits to comments.
2014-03-18 20:59:36 -04:00
vladdd
ef9922ebe9
Finish refactor of test_updater.py.
...
test_updater.py now uses repository_tool.py to update the remote repository as needed, and no longer depends on mocking and repository_setup.py.
2014-03-18 12:59:03 -04:00
Vladimir Diaz
eaee52e14e
[WIP] Refactor test_updater.py
...
Continue refactoring the test cases of test_updater.py.
Fix issue where repository_tool.py was not writing new compressed metadata.
Minor edits to TUF modules.
2014-03-13 12:31:36 -04:00
Vladimir Diaz
5e7713a93f
[WIP] Refactor test_updater.py and repository_setup.py.
...
Add generate.py script and pre-generated repository files used by Unit tests (replacing repository_setup.py).
Refactor test_updater.py (10 test cases remaining).
2014-03-11 09:08:53 -04:00
vladdd
2d015797ef
Update affected ed25519 modules.
...
Update modules affected by the changes made to the latest versions of pyca-ed25519 and pyca-pynacl:
Do not use the unsafe key and signature generation functions of pure python ed25519, but do support the signature verification routine. Developers must use the faster and secure pynacl+libsodium to generate ed25519 keys and signatures.
Temporarily suppress pynacl's import warning error.
Minor edits to comments and code.
2014-03-07 23:21:54 -05:00
vladdd
75c7ea5138
Update test_extraneous_dependencies_attack.py.
...
Remove text inserted and improperly removed from a previous merge conflict.
2014-02-03 12:45:17 -05:00
vladdd
a22099699e
Resolve remaining unit test failures.
...
Update the remaining unit tests following the many design changes. The unit tests should next be factored to use repository_tool.py, avoid pseudo repositories and repository objects, monkey patching, etc.
2014-01-31 14:47:48 -05:00
Vladimir Diaz
7b27fcec64
Continue unit test updates.
2014-01-30 13:06:33 -05:00
Vladimir Diaz
36b59f922e
Continue updating unit tests and modify ROOT_SCHEMA.
2014-01-30 08:11:35 -05:00
Vladimir Diaz
009ddd9f37
Rename top-level role and functions of repository_tool.py. Update documentation and diagram.
...
add_key() -> add_verification_key()
remove_key() -> remove_verification_key()
release.json -> snapshot.json
Update repository_tool-diagram.png
Update README following the renamed functions and release role changes.
Minor edits, such as removing lint left over from a previous merge conflict.
2014-01-29 11:26:56 -05:00
Vladimir Diaz
3b5e0c0814
Merge 'develop' and resolve conflicts.
2014-01-27 13:35:11 -05:00
Vladimir Diaz
d380997b75
Minor edits, merge, and resolve conflicts.
2014-01-27 13:15:03 -05:00
zanefisher
43eb5633c4
Modify test code following review from Vladimir
2014-01-07 14:20:20 -05:00
Vladimir Diaz
c58906f9c2
Fix for issue #153
...
Update the key modules and their unit tests so that only the signature scheme is included in the signature label.
PyCrypto-PKCS#1 PSS -> RSASSA-PSS
ed25519-python and ed25519-pynacl -> ed25519
2013-11-27 12:11:16 -05:00
Vladimir Diaz
191f32aa74
Continue refactor of libtuf.py
2013-11-25 15:01:27 -05:00
Vladimir
3ca6261f79
Merge and resolve conflicts
2013-11-15 10:09:59 -05:00
vladdd
45af91191a
Update docstrings and comments in keys.py
...
Configurable crypto changes previously implemented but the docstrings and comments of keys.py still needed updating. Minor edit to test_keys.py and a note added about a missing test case.
2013-10-18 14:01:51 -04:00
vladdd
760cd62d4e
Rename functions in keys.py and update test_keys.py
...
create_in_metadata_format --> format_keyval_to_metadata
create_from_metadata_format --> format_metadata_to_key
2013-10-17 14:05:26 -04:00
vladdd
05f7826b59
Update test_pycrypto_keys.py after pycrypto_keys.py changes
2013-10-17 13:01:32 -04:00
vladdd
76d7796c4e
Merge branch 'develop' of https://github.com/theupdateframework/tuf into integration-tests-python3
2013-10-14 09:36:29 -04:00
vladdd
dc84e051e6
Update the valid expiration data
2013-10-14 09:20:49 -04:00
vladdd
7e593963a9
Complete test_verify_signature() in test_ed25519_keys.py
2013-10-14 08:41:38 -04:00
vladdd
7e948f342c
Add initial test_ed25519_keys.py
...
test_verify_signature() incomplete.
2013-10-11 13:01:46 -04:00
vladdd
81a15147b2
Add remaining test cases in test_pycrypto_keys.py
2013-10-11 10:15:09 -04:00
vladdd
2f61272c28
Update test cases moved over to test_pycrypto_keys.py
...
test cases updated with configurable crypto changes.
2013-10-11 09:07:25 -04:00
vladdd
ac6dade0dc
Move test cases to test_pycrypto_keys.py
2013-10-10 14:56:56 -04:00
vladdd
a091b1f84b
Add test_keys.py and update keys.py
2013-10-10 14:01:55 -04:00
vladdd
31d603c710
Update all unit tests affected by configurable crypto
...
Add separate 'tuf.conf.py' options for key types.
2013-10-10 12:19:46 -04:00
zanefisher
c941eda8d2
Changes following Santiago\'s review.
2013-10-04 14:00:36 -04:00
zanefisher
0b9d2e223f
Python 3 compatibility for arbitrary package and etraneous dependency tests.
2013-10-02 13:03:52 -04:00
zanefisher
b2ac2e82f2
Remove unnecessary import from extraneous dependencies test.
2013-09-30 14:52:37 -04:00
zanefisher
eca682a58a
Add case for BadSignatureError to arbitrary package and extraneous dependencies tests.
2013-09-30 13:20:09 -04:00
vladdd
e848dac0f3
test_slow_retrieval_attack.py: Python 3 compatability
...
Fixed indentation and outdated comment.
2013-09-23 21:23:26 -04:00
vladdd
fc08f5181b
test_replay_attack.py: Python 3 compatability
...
Also fix indentation.
2013-09-23 21:18:52 -04:00
vladdd
f62ed3a019
test_mix_and_match_attack.py: Python 3 compatability
2013-09-23 21:16:55 -04:00
vladdd
7c882b70c7
test_indefinite_freeze_attack.py: Python 3 compatability
2013-09-23 21:13:34 -04:00
vladdd
2f32ea9424
test_extraneous_dependencies_attack.py: python 3 compatability
...
Also fix print statements.
2013-09-23 21:07:35 -04:00
vladdd
67b886d5e0
test_endless_data_attack.py: Fix indentation
...
Also help with Python 3 compatability.
2013-09-23 21:02:17 -04:00
vladdd
3f41b96f7f
Fix extraneous new lines in test_delegations.py
2013-09-23 20:55:34 -04:00
vladdd
0a94661d99
Fix print statements and help with python 3 compatability
...
test_arbitrary_package_attack.py.
2013-09-23 20:52:16 -04:00
vladdd
7d691011e5
Resolve conflicts from demo 2 updates
2013-09-23 13:38:18 -04:00
dachshund
d9e952ef5b
Fix replay attack integration test.
...
Merge remote-tracking branch 'origin/demo2' into demo2
Conflicts:
tests/integration/test_replay_attack.py
2013-09-17 23:02:17 -04:00
dachshund
b0e328be53
Fix replay attack integration test.
...
Merge remote-tracking branch 'origin/demo2' into demo2
Conflicts:
tests/integration/test_replay_attack.py
2013-09-17 23:02:17 -04:00
dachshund
7eb834ab84
Fix replay attack integration test.
2013-09-17 22:59:26 -04:00
dachshund
4e42a091a2
Fix replay attack integration test.
2013-09-17 22:59:26 -04:00
vladdd
c2689280b0
Resolve merge conflicts
2013-09-17 21:10:51 -04:00
vladdd
b17b53112c
Resolve merge conflicts
2013-09-17 21:10:51 -04:00
vladdd
ac2e7b5e15
Merge branch 'demo2' of https://github.com/theupdateframework/tuf into demo2
2013-09-17 20:23:11 -04:00
vladdd
81831b861e
Merge branch 'demo2' of https://github.com/theupdateframework/tuf into demo2
2013-09-17 20:23:11 -04:00
vladdd
071190d18b
Fix docstring indentation in test_arbitrary_package_attack.py
2013-09-17 20:20:55 -04:00
vladdd
98ae4a6d68
Fix docstring indentation in test_arbitrary_package_attack.py
2013-09-17 20:20:55 -04:00
dachshund
76326f82d1
Merge #108 .
2013-09-17 20:02:54 -04:00
dachshund
91aff1c420
Merge #108 .
2013-09-17 20:02:54 -04:00
dachshund
e210decd61
Merge branch 'demo2' of https://github.com/zhengyuyu/tuf into zhengyuyu-demo2
2013-09-17 19:38:26 -04:00
dachshund
61be096ad9
Merge branch 'demo2' of https://github.com/zhengyuyu/tuf into zhengyuyu-demo2
2013-09-17 19:38:26 -04:00
ttgump
017c9a378f
fix of connection refused
2013-09-16 11:12:18 -04:00
ttgump
0f71b7604d
fix of connection refused
2013-09-16 11:12:18 -04:00
ttgump
2baaa58a20
fetch upstream
2013-09-16 10:57:23 -04:00
ttgump
c393507fcd
fetch upstream
2013-09-16 10:57:23 -04:00
vladimir-v-diaz
b9ec0a0b26
Update test_util_test_tools.py following change to util_test_tools.init_repo()
...
A util_test_tools.init_repo() parameter name was changed from 'tuf' to 'using_tuf', however, test_util_test_tools was not updated following the name change.
2013-09-16 09:09:40 -04:00
vladimir-v-diaz
cc0d7f9e89
Update test_util_test_tools.py following change to util_test_tools.init_repo()
...
A util_test_tools.init_repo() parameter name was changed from 'tuf' to 'using_tuf', however, test_util_test_tools was not updated following the name change.
2013-09-16 09:09:40 -04:00
zanefisher
f3a8f60583
Clean up after botched merge (oops). Add try/finally to endless data test to ensure temp files are always removed.
2013-09-14 16:58:01 -04:00
zanefisher
0fd5e36909
Clean up after botched merge (oops). Add try/finally to endless data test to ensure temp files are always removed.
2013-09-14 16:58:01 -04:00
ttgump
4c2f878870
util_test_tools.init_repo parameter fix
2013-09-14 15:46:25 -04:00
ttgump
c74a2d495f
util_test_tools.init_repo parameter fix
2013-09-14 15:46:25 -04:00
ttgump
cd805e528d
indention fix
2013-09-14 12:34:01 -07:00
ttgump
a688a6d06f
indention fix
2013-09-14 12:34:01 -07:00
ttgump
dccd5fc7df
Merge remote-tracking branch 'origin/demo2' into demo2
2013-09-14 12:31:15 -07:00
ttgump
2fc73dd468
Merge remote-tracking branch 'origin/demo2' into demo2
2013-09-14 12:31:15 -07:00
ttgump
3cf472757a
test_mix_and_match_attack and test_indefinite_freeze_attack refactory fix
2013-09-13 19:14:32 -04:00
ttgump
384626cff9
test_mix_and_match_attack and test_indefinite_freeze_attack refactory fix
2013-09-13 19:14:32 -04:00
zanefisher
b991cdc21d
Redo accidentally undone changes.
2013-09-13 18:52:47 -04:00
zanefisher
4a08c0c25e
Redo accidentally undone changes.
2013-09-13 18:52:47 -04:00
zhengyuyu
f0258ea82c
Fix test_delegations.py
...
Made changes that ensure it raises correct exception based on the refactored version of updater.py and download.py
2013-09-13 18:38:52 -04:00
zhengyuyu
ccbaa6fab4
Fix test_delegations.py
...
Made changes that ensure it raises correct exception based on the refactored version of updater.py and download.py
2013-09-13 18:38:52 -04:00
dachshund
edec089965
Fix variable shadow bug, use absolute import in two integration tests.
2013-09-13 17:39:57 -04:00
dachshund
b5263e4322
Fix variable shadow bug, use absolute import in two integration tests.
2013-09-13 17:39:57 -04:00
zanefisher
e059cf814b
More integration test tidying-up
2013-09-13 17:39:29 -04:00
zanefisher
502a0102ec
More integration test tidying-up
2013-09-13 17:39:29 -04:00
zanefisher
a397e208cd
Rename boolean perameter 'TUF' to 'using_tuf' in every test.
2013-09-13 15:30:11 -04:00
zanefisher
f4eedf1d62
Rename boolean perameter 'TUF' to 'using_tuf' in every test.
2013-09-13 15:30:11 -04:00
zanefisher
8d8c223123
Merge remote-tracking branch 'upstream/demo2' into demo2
2013-09-13 13:39:44 -04:00
zanefisher
419b1dc24e
Merge remote-tracking branch 'upstream/demo2' into demo2
2013-09-13 13:39:44 -04:00
zanefisher
f2517e1717
Clean up extraneous dependencies test following Vlad's review.
2013-09-13 13:38:50 -04:00
zanefisher
32427505ac
Clean up extraneous dependencies test following Vlad's review.
2013-09-13 13:38:50 -04:00
vladdd
83ac535d32
Fix test_updater.py test case failure
...
Rebuild server repository in test_5_all_targets() - other test cases may not have properly restored the contents of the repository.
2013-09-13 09:54:10 -04:00
vladdd
d8841544e4
Fix test_updater.py test case failure
...
Rebuild server repository in test_5_all_targets() - other test cases may not have properly restored the contents of the repository.
2013-09-13 09:54:10 -04:00
zanefisher
d75e47f2cd
Merge remote-tracking branch 'upstream/demo2' into demo2
2013-09-12 14:54:25 -04:00
zanefisher
4f8054755c
Merge remote-tracking branch 'upstream/demo2' into demo2
2013-09-12 14:54:25 -04:00
zanefisher
a3fbb50b2a
Update extraneous dependecies test to expect the new NoWorkingMirrorError.
2013-09-12 14:53:57 -04:00
zanefisher
a5692a1441
Update extraneous dependecies test to expect the new NoWorkingMirrorError.
2013-09-12 14:53:57 -04:00
vladdd
b89d6fb853
Update test_keystore.py following .key format and keystore changes
2013-09-12 13:02:54 -04:00
vladdd
dc146f97a1
Fix test_util_test_tools.py test case failure
...
Clear the keystore before initializing the util_test_tools.py repository and again after every test case exits.
2013-09-12 08:14:18 -04:00
vladdd
3111c22c63
Fix test_util_test_tools.py test case failure
...
Clear the keystore before initializing the util_test_tools.py repository and again after every test case exits.
2013-09-12 08:14:18 -04:00
vladdd
a1132af5af
Fix test_keystore.py unit test failure
...
Ensure the keystore is empty prior to running the test cases. The courtesy bug is spreading.
2013-09-11 13:33:28 -04:00
vladdd
a749c1d6bf
Fix test_keystore.py unit test failure
...
Ensure the keystore is empty prior to running the test cases. The courtesy bug is spreading.
2013-09-11 13:33:28 -04:00
vladdd
7e98cb8269
Fix unit test failure in test_roledb.py
...
Ensure roledb is empty prior to running the test cases. roledb.py may have been modified by other unit tests that did not properly clean up.
2013-09-11 12:36:44 -04:00
vladdd
b7d86eca36
Fix unit test failure in test_roledb.py
...
Ensure roledb is empty prior to running the test cases. roledb.py may have been modified by other unit tests that did not properly clean up.
2013-09-11 12:36:44 -04:00
dachshund
59dfa1f5ba
Replace relative with absolute imports for tests.
2013-09-10 17:33:00 -04:00
dachshund
96c0aaaa9e
Replace relative with absolute imports for tests.
2013-09-10 17:33:00 -04:00
dachshund
864d3065a8
Merge unit test fix from @zanefisher; fix a unit test bug.
2013-09-10 00:56:30 -04:00
dachshund
9cbffa1660
Merge unit test fix from @zanefisher; fix a unit test bug.
2013-09-10 00:56:30 -04:00
dachshund
9bd35596c9
Merge branch 'demo2' of https://github.com/zanefisher/tuf into demo2
...
Conflicts:
tests/unit/test_updater.py
2013-09-10 00:39:49 -04:00
dachshund
a8d32a2220
Merge branch 'demo2' of https://github.com/zanefisher/tuf into demo2
...
Conflicts:
tests/unit/test_updater.py
2013-09-10 00:39:49 -04:00
dachshund
78344636de
Even better organization of tests; remove evpy.
...
Require higher versions of PyCrypto.
2013-09-10 00:24:34 -04:00
dachshund
c20f0a1455
Even better organization of tests; remove evpy.
...
Require higher versions of PyCrypto.
2013-09-10 00:24:34 -04:00