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

Add tests for MSC3890: Remotely silence local notifications #576

Merged
merged 8 commits into from
Jan 13, 2023

Conversation

anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Jan 3, 2023

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
tests/msc3890_test.go Outdated Show resolved Hide resolved
tests/msc3890_test.go Outdated Show resolved Hide resolved
@clokep clokep changed the title Add tests for MSC3890 Add tests for MSC3890: Remotely silence local notifications Jan 12, 2023
internal/docker/deployment.go Outdated Show resolved Hide resolved
flake.lock Outdated Show resolved Hide resolved
Copy link
Contributor

@squahtx squahtx left a comment

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