Lukas Puehringer
438518f68c
tests: remove unused and obsolete test metadata
...
- metadata.staged: related to a removed tutorial and outdated deployment
recommendation
- project: related to the removed developer_tool (#1790 )
- map.json: related to TAP4, which is not supported by python-tuf
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2023-10-11 15:09:09 +02:00
Jussi Kukkonen
271d5b7810
Metadata API: verify_delegate: refactor
...
* Rename arguments so connection between the role name and the
metadata is stronger.
* Also add a comment on the list comprehension + next() trick.
* Add return value annotation
* Raise early if delegations is None to make the flow more obvious
(and modify test case so we have coverage for the new case)
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-07-08 20:16:42 +03:00
Joshua Lock
3720b2358e
Re-generate repository and client test metadata
...
Re-generate metadata to adopt the change that root.json is no longer
listed in snapshot.json
```
# Remove repository and client data
cd tests/repository_data && rm -rf repository client
# Generate metadata
python generate.py
# Duplicate metadata files
cp -r client/test_repository1 client/test_repository2
# Recover non-signed file
git checkout client/map.json
```
Signed-off-by: Joshua Lock <jlock@vmware.com>
2020-03-11 11:35:37 +00:00
Lukas Puehringer
af1a21b05a
Re-generate repository and client test metadata
...
Re-generate metadata to adopt spec version format change, using
`generate.py` plus some working around (see script below):
```
# QUICKFIX: Patch add_target to pass file paths relative to targets dir
git apply - <<EOF
diff --git a/tests/repository_data/generate.py b/tests/repository_data/generate.py
index 6c263575..699ed00f 100755
--- a/tests/repository_data/generate.py
+++ b/tests/repository_data/generate.py
@@ -119,12 +119,11 @@ if not options.dry_run:
# about the target (i.e., file permissions in octal format.)
octal_file_permissions = oct(os.stat(target1_filepath).st_mode)[4:]
file_permissions = {'file_permissions': octal_file_permissions}
-repository.targets.add_target(target1_filepath, file_permissions)
-repository.targets.add_target(target2_filepath)
+repository.targets.add_target('file1.txt', file_permissions)
+repository.targets.add_target('file2.txt')
-repository.targets.delegate('role1', [delegation_public],
- [os.path.basename(target3_filepath)])
-repository.targets('role1').add_target(target3_filepath)
+repository.targets.delegate('role1', [delegation_public], ['file3.txt'])
+repository.targets('role1').add_target('file3.txt')
repository.targets('role1').load_signing_key(delegation_private)
repository.targets('role1').delegate('role2', [delegation_public], [])
EOF
# Remove repository and client data
cd repository_data && rm -rf repository client
# Generate metadata
python generate.py
# Duplicate metadata files
cp -r client/test_repository1 client/test_repository2
# Recover non-signed file
git checkout client/map.json
```
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2019-09-16 15:43:39 +02:00
Vladimir Diaz
f460f46ef6
Add new repo data that excludes paths with a leading os.sep
...
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
2018-04-06 11:06:30 -04:00
Vladimir Diaz
d4f6362dcf
Add metadata that contains 'spec_version'
2017-08-28 15:12:57 -04:00
Vladimir Diaz
924b97d1d7
Resolve conflicts
2017-08-28 13:07:54 -04:00
Vladimir Diaz
419569c6d6
Re-generate metadata that doesn't reference compressed metadata
2017-08-25 17:26:02 -04:00
Vladimir Diaz
3933232efc
Add new metadata that includes the signing scheme
2017-08-23 10:57:34 -04:00
Vladimir Diaz
6e26c31f70
Add metadata where _type = lowercase
2017-07-12 14:56:01 -04:00
Vladimir Diaz
f6d0d07a0e
Add missing root.json.gz metadata
2017-07-11 10:19:32 -04:00
Vladimir Diaz
ee5c4fee08
Add new repository metadata
2017-07-10 17:08:35 -04:00
Vladimir Diaz
17ea827e76
Add repository data where the client directory is reorganized
2017-02-06 16:14:35 -05:00
Vladimir Diaz
2bfc799439
Add test metadata that includes the spec version number
2016-12-01 11:28:42 -05:00
Vladimir Diaz
8882dc5b7b
Merge branch 'root-versioning' of https://github.com/ecordell/tuf into ecordell-root-versioning
...
Conflicts:
tests/test_key_revocation.py
tests/test_replay_attack.py
tests/test_repository_tool.py
tests/test_updater.py
tuf/formats.py
tuf/repository_lib.py
2016-10-17 15:57:48 -04:00
Evan Cordell
0e93c3a7d2
Enforce root version signature chaining in client updater
2016-09-19 15:18:33 -04:00
Vladimir Diaz
b5a0cc413b
Add test repository
...
compressed metadata was incorrectly listed in snapshot.json. List on roles with '.json' extension
2016-09-15 16:33:20 -04:00
Vladimir Diaz
26016479e9
Add test repository following changes to repository writing and backtracking
2016-09-15 15:19:27 -04:00
Vladimir Diaz
65d23fa5a7
Reference all metadata in <version>.rolename.json format
2016-07-14 10:31:16 -04:00
Vladimir Diaz
2a9e4c28ad
Add latest repository example and unit test fixes
2016-06-27 17:02:27 -04:00
Vladimir Diaz
8e0e5a19e8
Generate metadata following change to Ed25519 keys
2016-06-17 09:56:13 -04:00
Vladimir Diaz
ba0f9ca936
Initial changes for multihash keyid algorithms support on write
2016-06-08 16:49:13 -04:00
Vladimir Diaz
c0958f11f2
Modify repository data to use new snapshot format
...
snapshot.json should list the hash(es) of root metadata, rather than version number
2016-04-14 08:11:34 -04:00
Vladimir Diaz
28e738ed8c
Repository data that contains the correct number of delegated roles in snapshot.json
2016-03-28 17:51:43 -04:00
Vladimir Diaz
6611efbf09
Add the new delegation structure to repository_data
2016-03-02 12:03:39 -05:00
Vladimir Diaz
14ca0d1565
Update the repository test data following the addition of the 'compression algorithms' key in root.json
2015-10-20 09:14:21 -04:00
Vladimir Diaz
d993ccf35e
Generate a repository for the unit tests that contains the changes to the snapshot role
2015-10-15 09:53:54 -04:00
Vladimir Diaz
b7cf7e6588
Improve each module's code coverage to at least 90%
...
Update unit tests for download.py, repository_lib.py, repository_tool.py, and updater.py.
Re-generate repository data so that compressed metadata may be tested.
2015-02-11 13:22:46 -05:00
Vladimir Diaz
337c9f9ffc
Regenerate '/tests/repository_data/' to include example of custom data.
2014-06-24 10:17:14 -04:00
vladdd
744be00cbc
Initial implementation of authoritative delegations.
2014-06-07 20:29:18 -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
80ad012bc3
Re-generate repository data.
2014-06-03 14:28:46 -04:00
vladdd
5f94d5be0d
Support ISO 8601, vendor iso8601, clean codebase.
2014-04-19 14:27:53 -04:00
Vladimir Diaz
25e800a59c
Re-generate 'tests/repository_data' to include metadata unix timestamps.
2014-04-15 12:43:12 -04:00
Vladimir Diaz
63afb1e99f
Re-add repository data for the tests.
2014-04-03 08:52:16 -04:00