Skip to content

Add tests for multiple root key rotation - #930

Merged
lukpueh merged 4 commits into
theupdateframework:developfrom
lukpueh:correctly-rotate-root-test
Oct 8, 2019
Merged

lukpueh merged 4 commits into
theupdateframework:developfrom
lukpueh:correctly-rotate-root-test

Conversation

@lukpueh

@lukpueh lukpueh commented Oct 7, 2019

Copy link
Copy Markdown
Member

Fixes issue #:
Add tests for bugfix provided by #885.

Description of the changes being introduced by the pull request:

  • Add two ed25519 key pairs for updater root key rotation tests
  • Add two root key rotation tests

See commit messages for more details.

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Lukas Puehringer added 3 commits October 7, 2019 11:59
This commit also updates the key loader helper in
test_updater_root_rotation_integration.py to load
the new keys too.

The keys were created (at the root of the repository) like
so:

```
from tuf import repository_tool
repository_tool.generate_and_write_ed25519_keypair(
    "tests/repository_data/keystore/root_key2", "password")
repository_tool.generate_and_write_ed25519_keypair(
    "tests/repository_data/keystore/root_key3", "password")

```

Signed-off-by: Lukas Puehringer <[email protected]>
Test that a client whose root is outdated by multiple versions and
who has none of the latest nor next-to-latest root keys can still
update and does so by incrementally verifying all roots until the
most recent one.

Signed-off-by: Lukas Puehringer <[email protected]>
Test that client does not rotate beyond a configured upper bound,
i.e. `current_version + MAX_NUMBER_ROOT_ROTATIONS`

Signed-off-by: Lukas Puehringer <[email protected]>
@lukpueh

lukpueh commented Oct 7, 2019

Copy link
Copy Markdown
Member Author

@trishankatdatadog, would you mind giving me a LGTM on these tests that I added for the bug fix you provided in #885?

@trishankatdatadog trishankatdatadog left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @lukpueh, thanks very much!

Have you tested this PR on both my branch (should ✅), and master (should ❌)?

Signed-off-by: Lukas Puehringer <[email protected]>
Co-Authored-By: Trishank K Kuppusamy <[email protected]>
@lukpueh
lukpueh force-pushed the correctly-rotate-root-test branch from 2ef4bed to 4d7bb69 Compare October 8, 2019 07:19
@lukpueh

lukpueh commented Oct 8, 2019

Copy link
Copy Markdown
Member Author

Have you tested this PR on both my branch (should ✅), and master (should ❌)?

Yes I did, and yes it did! :)

Thanks for catching the comment mistake. Will merge once the tests ran through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants