Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Refactor key rotation in simulator #1766

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

jku
Copy link
Member

@jku jku commented Jan 11, 2022

Add a method to rotate roles keys into RepositorySimulator (only
top-level roles are supported for now). Rotation is used in four
places already and this refactoring makes the tests easier to
understand.

Signed-off-by: Jussi Kukkonen [email protected]

@jku jku requested a review from kairoaraujo January 11, 2022 17:24
@coveralls
Copy link

coveralls commented Jan 11, 2022

Pull Request Test Coverage Report for Build 1686443126

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.688%

Totals Coverage Status
Change from base Build 1683264892: 0.0%
Covered Lines: 4097
Relevant Lines: 4178

💛 - Coveralls

Copy link
Collaborator

@kairoaraujo kairoaraujo left a comment

Choose a reason for hiding this comment

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

Very nice refactoring.

tests/repository_simulator.py Outdated Show resolved Hide resolved
Add a method to rotate roles keys into RepositorySimulator (only
top-level roles are supported for now). Rotation is used in four
places already and this refactoring makes the tests easier to
understand.

Signed-off-by: Jussi Kukkonen <[email protected]>
@jku jku force-pushed the tests-sim-add-key-rotation branch from b11b3b3 to a38bf7c Compare January 12, 2022 07:34
@jku
Copy link
Member Author

jku commented Jan 12, 2022

improved variable names as Kairo suggested, no other changes

@jku jku mentioned this pull request Jan 28, 2022
Copy link
Collaborator

@MVrachev MVrachev left a comment

Choose a reason for hiding this comment

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

Agree with Kairo.
Great refactoring.

Copy link
Member

@lukpueh lukpueh left a comment

Choose a reason for hiding this comment

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

Nice DRY, @jku!

@lukpueh lukpueh merged commit 215073e into theupdateframework:develop Feb 3, 2022
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.

5 participants