Repository navigation
More trusted set tests - #1522
Merged
Merged
Conversation
added 4 commits
August 17, 2021 13:54
* test for succesful root update * fix test for snapshot version rollback in timestamp update Signed-off-by: Jussi Kukkonen <[email protected]>
Test failing length/hash test for snapshot Signed-off-by: Jussi Kukkonen <[email protected]>
We're unlikely to use the iterator but it's required to implement Mapping. Signed-off-by: Jussi Kukkonen <[email protected]>
Signed-off-by: Jussi Kukkonen <[email protected]>
2 tasks done
MVrachev
approved these changes
Aug 18, 2021
MVrachev
left a comment
Collaborator
There was a problem hiding this comment.
The changes are simple and make sense.
LGTM!
Comment on lines
+258
to
+264
| def test_update_timestamp_snapshot_ver_below_current(self): | ||
| def bump_snapshot_version(timestamp: Timestamp) -> None: | ||
| timestamp.meta["snapshot.json"].version = 2 | ||
|
|
||
| # set current known snapshot.json version to 2 | ||
| timestamp = self.modify_metadata("timestamp", bump_snapshot_version) | ||
| self._root_updated_and_update_timestamp(timestamp) |
Collaborator
There was a problem hiding this comment.
I see I made a mistake when writing this test and test_update_timestamp_new_timestamp_ver_below_trusted_ver test.
It must have been a mistake while rebasing.
Great catch!
joshuagl
approved these changes
Aug 19, 2021
joshuagl
left a comment
Member
There was a problem hiding this comment.
Nice set of test enhancements, LGTM
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gets us to 99% coverage (the only missing thing is successful rollback test -- IOW successfully updating a new snapshot when a snapshot is loaded already -- this requires #1498 I think)