-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore!: Remove deprecated client Init() function (#353)
* chore!: Remove deprecated client Init() function Has been deprecated for a release or so. This fixes some tests and removes others; the removals are all justified: - TestInitRootExpired: testing of InitLocal checks the behavior on expired roots (which is *different*; it allows expired roots) - TestInitRootTooLarge: covered now in TestUpdate We also add a "RawMeta" function, used to get at the root json. I could be persuaded that this should be a "RawRoot" instead. BREAKING CHANGE: remove client.Init() in favor of InitLocal() Signed-off-by: Zachary Newman <[email protected]> * refactor: replace Repo.RawMeta with Repo.GetMeta Signed-off-by: Zachary Newman <[email protected]>
- Loading branch information
Showing
38 changed files
with
1,352 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
client/testdata/Published2Times_roottoolarge/client/metadata/current/1.root.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"signatures": [ | ||
{ | ||
"keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", | ||
"sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" | ||
} | ||
], | ||
"signed": { | ||
"_type": "root", | ||
"consistent_snapshot": true, | ||
"expires": "2031-09-09T23:13:37Z", | ||
"keys": { | ||
"3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" | ||
}, | ||
"scheme": "ed25519" | ||
}, | ||
"77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" | ||
}, | ||
"scheme": "ed25519" | ||
}, | ||
"d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" | ||
}, | ||
"scheme": "ed25519" | ||
}, | ||
"e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" | ||
}, | ||
"scheme": "ed25519" | ||
} | ||
}, | ||
"roles": { | ||
"root": { | ||
"keyids": [ | ||
"d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" | ||
], | ||
"threshold": 1 | ||
}, | ||
"snapshot": { | ||
"keyids": [ | ||
"77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" | ||
], | ||
"threshold": 1 | ||
}, | ||
"targets": { | ||
"keyids": [ | ||
"e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" | ||
], | ||
"threshold": 1 | ||
}, | ||
"timestamp": { | ||
"keyids": [ | ||
"3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" | ||
], | ||
"threshold": 1 | ||
} | ||
}, | ||
"spec_version": "1.0.0", | ||
"version": 1 | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
client/testdata/Published2Times_roottoolarge/client/metadata/current/1.snapshot.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"signatures": [ | ||
{ | ||
"keyid": "77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93", | ||
"sig": "ecf4d79a88873efb223361e550b8fc35813ad7bf31d9769908d9495cfb930e03db889dc7419897031cadf39437c9f49b085f384fe1c18be3961704062365db0c" | ||
} | ||
], | ||
"signed": { | ||
"_type": "snapshot", | ||
"expires": "2031-09-09T23:13:37Z", | ||
"meta": { | ||
"targets.json": { | ||
"version": 1 | ||
} | ||
}, | ||
"spec_version": "1.0.0", | ||
"version": 1 | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
client/testdata/Published2Times_roottoolarge/client/metadata/current/1.targets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"signatures": [ | ||
{ | ||
"keyid": "e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4", | ||
"sig": "f2cee9e31bda3f88b25b0153bb48a6cb21237e4c41a34bbae95f152b56975085bc04c4978eed6be76a3ead23ff76a1259ff07e7b45b04fb51865c9601713c905" | ||
} | ||
], | ||
"signed": { | ||
"_type": "targets", | ||
"delegations": { | ||
"keys": {}, | ||
"roles": [] | ||
}, | ||
"expires": "2031-09-09T23:13:37Z", | ||
"spec_version": "1.0.0", | ||
"targets": {}, | ||
"version": 1 | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
client/testdata/Published2Times_roottoolarge/client/metadata/current/1.timestamp.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"signatures": [ | ||
{ | ||
"keyid": "3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae", | ||
"sig": "35d1087c4874221bc772c8276bd77415d9366833aad4efc3926a8eda1de053843d2c114ac7448f08e3cfd802857c2ab2569d8be186b3cc36e65e458905f0e10e" | ||
} | ||
], | ||
"signed": { | ||
"_type": "timestamp", | ||
"expires": "2031-09-09T23:13:37Z", | ||
"meta": { | ||
"snapshot.json": { | ||
"hashes": { | ||
"sha256": "d62f650c8097fd4de9e3c8874ef15f7e10fdcc4c32f7a1818e972e8984b8da8a", | ||
"sha512": "d9d0c38df27bc2ccc9523cb8d27623cb40b264053233e5e3261d83e2921c790b21accf9d427e36aa4c1939ddbccaaa5e006267f1cdd451606c514135d178dca5" | ||
}, | ||
"length": 431, | ||
"version": 1 | ||
} | ||
}, | ||
"spec_version": "1.0.0", | ||
"version": 1 | ||
} | ||
} |
87 changes: 87 additions & 0 deletions
87
client/testdata/Published2Times_roottoolarge/client/metadata/current/root.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"signatures": [ | ||
{ | ||
"keyid": "d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129", | ||
"sig": "481a1bd10fedbe33e88e5f586a8726f558a5ec426bf65d2ba1c449fd1f69148da6af40f1ae18a5be63539dfbf076019db8b28f3f644f7fd4f003b7d06a4c2e09" | ||
} | ||
], | ||
"signed": { | ||
"_type": "root", | ||
"consistent_snapshot": true, | ||
"expires": "2031-09-09T23:13:37Z", | ||
"keys": { | ||
"3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "6bac59b8d9e1aae02fae6fba6e7fe3fc9fe5b4a9fe98c3fca255d8c8ec3e5b35" | ||
}, | ||
"scheme": "ed25519" | ||
}, | ||
"77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "6400d770c7c1bce4b3d59ce0079ed686e843b6500bbea77d869a1ae7df4565a1" | ||
}, | ||
"scheme": "ed25519" | ||
}, | ||
"d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "28bf74baa87ed923f8fa27e3292684f8ec4730ce0bdc65150ed58199206ce089" | ||
}, | ||
"scheme": "ed25519" | ||
}, | ||
"e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "e6ae9d3b67d7b3ce274130291dd90287f32b8fd72bfb4ac5430859ebd1c28a46" | ||
}, | ||
"scheme": "ed25519" | ||
} | ||
}, | ||
"roles": { | ||
"root": { | ||
"keyids": [ | ||
"d4dab4b4d68b91665a6d0dac5b4e64677aa6d853fc787669168b4b4ba9822129" | ||
], | ||
"threshold": 1 | ||
}, | ||
"snapshot": { | ||
"keyids": [ | ||
"77dfdca206c0fe1b8e55d67d21dd0e195a0998a9d2b56c6d3ee8f68d04c21e93" | ||
], | ||
"threshold": 1 | ||
}, | ||
"targets": { | ||
"keyids": [ | ||
"e4dae3872d28d29f7624a702bfd25f68453544d597229ee9e0a8569d1f940cf4" | ||
], | ||
"threshold": 1 | ||
}, | ||
"timestamp": { | ||
"keyids": [ | ||
"3a05831328273e4b821c3bbe1fed0c5332749d8e071675879af26a401a5c85ae" | ||
], | ||
"threshold": 1 | ||
} | ||
}, | ||
"spec_version": "1.0.0", | ||
"version": 1 | ||
} | ||
} |
Oops, something went wrong.