-
Notifications
You must be signed in to change notification settings - Fork 251
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
Groundwork for fixes to one-time-key fetching #2803
Conversation
`Account::create_outbound_session` no longer takes an entire list of keys; rather it takes a single key and it is up to the caller to pick a key out of the list. This in turn means that `SessionCreationError` loses one of its reason codes.
... and use it in some tests. Simplify some of the test code by not building a whole keys/claim response.
it's a bit pointless.
d832575
to
e408ffd
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2803 +/- ##
==========================================
+ Coverage 81.39% 81.73% +0.33%
==========================================
Files 204 204
Lines 20998 21008 +10
==========================================
+ Hits 17092 17171 +79
+ Misses 3906 3837 -69
☔ View full report in Codecov by Sentry. |
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.
Most of the commits here look fine, though I don't understand the final one.
Some non-functional refactoring in preparation for fixing #281. Suggest review commit-by-commit. The salient changes are:
Account::create_outbound_session
no longer takes an entire list of keys; rather it takes a single key and it is up to the caller to pick a key out of the list. This in turn means thatSessionCreationError
loses one of its reason codes.SessionManager::create_sessions
is factored out ofreceive_keys_claim_response
. This is mostly helpful in tests, where our goal is to establish a session with a given device, rather than actually to test parsing of the entire/keys/claim
response.