Skip to content

Add tests for MSC3890: Remotely silence local notifications - #576

Merged
anoadragon453 merged 8 commits into
mainfrom
anoa/msc3890
Jan 13, 2023
Merged

anoadragon453 merged 8 commits into
mainfrom
anoa/msc3890

Conversation

@anoadragon453

@anoadragon453 anoadragon453 commented Jan 3, 2023 •

Copy link
Copy Markdown
Member

Implements tests for MSC3890. The server-side of this MSC is quite small: simply delete a bit of account data when a user's device is logged out/deleted.

I ran into some complications when writing this test. Complement doesn't make it easy to manipulate multiple devices of the same user at once (at least as far as I can tell). I created a helper method to log in to an existing user account in order to create another device. From there I did a bit of a hack to create another CSAPI client. I'd be interested if people know a better way to manipulate multiple devices of a single user in Complement, or have ideas on how to improve the status quo. cd70eb9 improves this substantially by adding a LoginUser method to deployment. See this test code for how this can be used to create new devices on an existing user.

This method allows for creating a new device under the same user. This is a bit
of a hacky step towards supporting multiple devices for the same user (which
Complement doesn't do yet).
Again, a bit of a hack to support logging out another device.
@anoadragon453
anoadragon453 requested review from a team and kegsay as code owners January 3, 2023 18:59
Comment thread tests/msc3890_test.go Outdated
Comment thread tests/msc3890_test.go Outdated
@clokep clokep changed the title Add tests for MSC3890 Add tests for MSC3890: Remotely silence local notifications Jan 12, 2023
@anoadragon453
anoadragon453 requested a review from squahtx January 12, 2023 17:58
Comment thread internal/docker/deployment.go Outdated
Comment thread flake.lock Outdated
@anoadragon453
anoadragon453 requested a review from squahtx January 13, 2023 14:36

@squahtx squahtx 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!

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