You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ONBOARDING.md
+30
Original file line number
Diff line number
Diff line change
@@ -188,6 +188,36 @@ For Goland:
188
188
* Under "Run"->"Edit Configurations..."->"Templates"->"Go Test", add `COMPLEMENT_BASE_IMAGE=complement-dendrite:latest`
189
189
* Then you can right-click on any test file or test case and "Run <testname>".
190
190
191
+
192
+
### How do I hook up a Matrix client like Element to the homeservers spun up by Complement after a test runs?
193
+
194
+
It can be useful to view the output of a test in Element to better debug something going wrong or just make sure your test is doing what you expect before you try to assert everything.
195
+
196
+
1. In your test comment out `defer deployment.Destroy(t)` and replace with `defer time.Sleep(2 * time.Hour)` to keep the homeserver running after the tests complete
197
+
1. Start the Complement tests
198
+
1. Save the Element config as `~/Downloads/riot-complement-config.json` and replace the port according to the output from `docker ps` (`docker ps -f name=complement_` to just filter to the Complement containers)
0 commit comments