-
Notifications
You must be signed in to change notification settings - Fork 265
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
Implement test helpers for constructing user device data #4476
base: main
Are you sure you want to change the base?
Conversation
e31eff1
to
25f7927
Compare
/// Current user's private user-signing key, as an [`Ed25519SecretKey`]. | ||
pub fn me_private_user_signing_key() -> Ed25519SecretKey { | ||
Ed25519SecretKey::from_base64(Self::USER_SIGNING_KEY_PRIVATE_EXPORT).unwrap() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we end up using this in a few places in a later commit, hence pulling it out to a separate function
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4476 +/- ##
=======================================
Coverage 85.04% 85.05%
=======================================
Files 283 283
Lines 31749 31749
=======================================
+ Hits 27002 27003 +1
+ Misses 4747 4746 -1 ☔ View full report in Codecov by Sentry. |
a50bd6d
to
88b101c
Compare
Our test helper won't do this, and it's redundant
... and use it for some simple data
Regenerate Dan's data with new cross-signing and device keys, for which I know the private keys. The signatures are manually calculated for now; this will be improved in a later commit.
88b101c
to
1cce2f3
Compare
Currently it's very hard to extend our test data because it has been generated manually with real users and devices. I'd like to change that so that the data is created more dynamically, so that it is easier to extend.
This PR introduces a builder type which can be used to help construct such test data, and rebuilds some of the existing test data using it. Unfortunately we're lacking some private keys, so I've had to replace a couple of keys.
The PR also introduces some snapshots, so we can keep an eye on how the data is changing.
Recommend reviewing commit-by-commit.