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
@@ -194,6 +194,36 @@ For Goland:
194
194
* Under "Run"->"Edit Configurations..."->"Templates"->"Go Test", add `COMPLEMENT_BASE_IMAGE=complement-dendrite:latest`
195
195
* Then you can right-click on any test file or test case and "Run <testname>".
196
196
197
+
198
+
### How do I hook up a Matrix client like Element to the homeservers spun up by Complement after a test runs?
199
+
200
+
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.
201
+
202
+
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
203
+
1. Start the Complement tests
204
+
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