-
Notifications
You must be signed in to change notification settings - Fork 871
FTUE - Fix trusting certificates during edit server flow #6873
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
Conversation
| ?.let { startAuthenticationFlow(finalLastAction, it, serverTypeOverride = null) } | ||
| } | ||
| when (action.retryAction) { | ||
| is OnboardingAction.HomeServerChange -> handleHomeserverChange(action.retryAction, fingerprint = action.fingerprint) |
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.
is OnboardingAction.HomeServerChange.SelectHomeServer to is OnboardingAction.HomeServerChange is the fix, the other changes are refactors to enable unit testing the change
| .build() | ||
| action.retryAction, | ||
| // Will be replaced by the task | ||
| homeServerConnectionConfigFactory.create("https://dummy.org", action.fingerprint) |
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.
reuses the factory to avoid directly interacting with android's Uri and making the change untestable without further refactors
- allows a retryAction to be provided to the event to avoid mutatble state within the view model along with providing a clear path of execution
- which in turn allows the android Uri to be bypassed and a unit test around the direct local certificate case added
…rtificate accept action - adds unit tests around the edit/selection cases
47f1e2e to
e948fe0
Compare
|
Kudos, SonarCloud Quality Gate passed! |
fedrunov
left a comment
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.
LGTM








Type of change
Content
EditHomeserverflow when handling certificate trustingHomeserverConfigstate in favour of recreating when needed (when trusting the certificate) which massively simplifies the unit testing setupretryActionwhen creating theCertificateError, avoids needing non persisted mutable state in the view model and reduces unit test setupMotivation and context
Fixes #6864 - Certificate trusting during the edit homeserver flow doing nothing
Screenshots / GIFs
Tests
I already have an accountflowEDITnextwithmatrix.orgselectedTested devices