Commit graph

212 commits

Author SHA1 Message Date
Vladimir Diaz
fc80976fc4 Remove extraneous closing parenthesis 2015-02-06 14:51:57 -05:00
Vladimir Diaz
623820c6ac Cosmetic edits to test_interpose_updater.py 2015-02-05 15:24:43 -05:00
Vladimir Diaz
90a283d589 Add initial Python 2+3 compatibility 2015-02-04 17:45:24 -05:00
Vladimir Diaz
4c4286cc63 Merge branch 'develop' of https://github.com/Pankh/tuf into Pankh-develop 2014-12-15 12:54:33 -05:00
Pankh
f6e0fecf07 Add header to test_interpose_updater 2014-10-22 14:44:31 -04:00
Pankh
b843684aee To merge the updates of Master branch 2014-09-29 14:45:24 -04:00
Pankh
7f64aad061 Test cases for tuf.interposition.updater with 98% coverage 2014-09-29 14:34:11 -04:00
Vladimir Diaz
3c9b1d0068 Add missed test coverage for updater.py's init().
Add test condition for missing previous directory in init().
2014-09-02 14:46:36 -04:00
Vladimir Diaz
419b1ca85e Log debug message for roles that are skipped in util.find_delegated_role(). 2014-08-20 12:27:06 -04:00
Vladimir Diaz
30f551131f Update test_keys.py
Strip PEM footer and reorder PEM header / footer test conditions.
2014-07-19 08:52:57 -04:00
vladdd
3fd6839c2b Add test case for keys.formats_rsakey_from_pem()
Add test_formats_rsakey_from_pem() test case and test conditions for improperly formatted PEM.
Add test condition to verify trailing whitespace is removed and matches the expected PEM format generated
internally.  Public PEMs generated externally (with the expected trailing newline) was not previously considered.
2014-07-18 15:24:10 -04:00
vladdd
20d5a6b3e4 Fix self.assertTrue() conditions in test_updater.py
A few test conditions in test_updater.py incorrectly used self.assertTrue() instead of self.assertEqual().
Fix updater.remove_obsolete_targets(), where targets in the destination directory were not being removed because target paths were treated as absolute paths by os.path.join().
2014-07-06 22:25:20 -04:00
Vladimir Diaz
aefb0172cf Merge pull request #233 from vladimir-v-diaz/meskio-filepath
Review and Update Pull Request #232
2014-07-04 18:09:44 -04:00
vladdd
9cf9a6a8b5 Review and update Pull Request #232.
Fix test conditions for updated_targets(), which incorrectly verified the expected number of updated targets with assertTrue().

Update comment for PR fix to clarify os.path.join() behavior and the expected file paths.
2014-07-04 17:50:22 -04:00
Vladimir Diaz
1985c450c9 Merge custom info changes, logger messages, and minor edits. 2014-07-02 11:10:50 -04:00
Vladimir Diaz
59b45fdfe5 Merge branch 'SantiagoTorres-developer-tools' of https://github.com/vladimir-v-diaz/tuf into develop 2014-07-01 07:47:47 -04:00
vladdd
2f520dd140 Review and update pull request #188. 2014-06-30 14:04:01 -04:00
vladdd
fde19957a4 Merge branch 'developer-tools' of https://github.com/SantiagoTorres/tuf into SantiagoTorres-developer-tools 2014-06-30 07:10:56 -04:00
Vladimir Diaz
5d766d3d6f Review and update docstrings and README. 2014-06-25 09:45:55 -04:00
Vladimir Diaz
528e33dd77 Add test condition for custom data in test_updater.py.
The updater client may reference target information (including 'custom') by accessing the dictionary returned by updater.py.

Example:
target = updater.target('LICENSE.txt')
target['filepath']
target['fileinfo']['length']
target['fileinfo']['hashes']
target['fileinfo']['custom']
2014-06-24 10:31:05 -04:00
Vladimir Diaz
337c9f9ffc Regenerate '/tests/repository_data/' to include example of custom data. 2014-06-24 10:17:14 -04:00
Vladimir Diaz
f6a9b7fc58 Verify that generated Targets metadata can contain custom data. 2014-06-24 09:38:47 -04:00
Vladimir Diaz
d5c56e550d Add test condition for repository_tool.Target().add_target() custom data. 2014-06-24 08:58:29 -04:00
vladdd
88d686b258 Initial implementation of custom FILEINFO 2014-06-23 13:33:01 -04:00
Santiago Torres
26eb5b7e35 Added relative filepath support and increased coverage
After seeing the coveralls report I realized the projects were not
relocatable. While this might be convenient for some uses, moving a
project from one place to another might not be optimal. This has been
changed now.

The only place where absolute filepaths are handled now is with flat
project layouts. However, it is possible to overwrite this filepath if
the targets folder is to be changed.
2014-06-21 19:07:34 -04:00
Santiago Torres
f9ce4fcb36 Added the test_developer_tool module
All of the neccessary test cases for the developer tool
2014-06-20 19:39:11 -04:00
Santiago Torres
07e8ef0be7 Added the generate_repository_data.py script and its produce
The generate_repository_data script works in the exact same way as the
generate script and it generates a fresh batch of pre-signed metadata to
test the load_project function.
2014-06-20 19:36:42 -04:00
Vladimir Diaz
c0a61e14e0 Add test coverage for repository_lib._log_status_of_top_level_roles().
Verify that status() does not raise 'tuf.InsufficientKeysError' nor 'tuf.UnsignedMetadataError'.
2014-06-19 11:24:07 -04:00
Vladimir Diaz
b105c7853c Add test condition for repository_lib.create_tuf_client_directory().
Verify that non-OSError.EEXist exceptions are re-raised.
2014-06-19 09:50:20 -04:00
Vladimir Diaz
882871ccfc Add missing test case for remove_target_from_bin(). 2014-06-18 12:39:39 -04:00
Vladimir Diaz
49a3a4990b Fix comment / typo in unsafe_download() test condition 2014-06-18 09:06:49 -04: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
Vladimir Diaz
6dafddc10f Add test case for https connection. 2014-06-17 10:28:56 -04:00
Vladimir Diaz
9d087389a9 Add the simple https server module. 2014-06-17 10:25:16 -04:00
Vladimir Diaz
e83045f162 Add self-signed certificates to be used by simple_https_server.py 2014-06-17 10:20:57 -04:00
vladdd
f0ac659110 Move optparse import statement.
Organize import statements of standard Python and TUF modules into separate blocks.
2014-06-16 13:11:35 -04:00
Santiago Torres
5a097faaf8 Added switches to the generate script
Added two switches to the generate script:

  -k (or --keys), which forces the creation of new keys.
  -d (or --dry-run), which skips the actual writing or copying phases

The second option might be useful in the future, and helped me debug the
optparse module, so I left it there.
2014-06-13 15:33:07 -04:00
Vladimir Diaz
e4c98d38ba Add missing test cases for download.py and and updater.py. 2014-06-12 09:33:12 -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
9e0392bb80 Add missing test coverage for pycrypto_keys.py. 2014-06-08 22:16:43 -04:00
vladdd
744be00cbc Initial implementation of authoritative delegations. 2014-06-07 20:29:18 -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
797bab5ddc Fix Python 2 + 3 JSON consistency issue and re-generate repository data.
Explicitly specify the JSON separators for Python 2 + 3 consistency.
2014-06-05 11:17:30 -04:00
Vladimir Diaz
66f4b88ef2 Update repository tool diagram and coverage.
Fix text box alignment in diagram.
Omit coverage of repository tool prompt and getpass.
Minor coverage update.
2014-06-03 14:59:56 -04:00