Skip to content

Commit a6e79b9

Browse files
committed
Move to step by step based db access
1 parent 3952efd commit a6e79b9

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

ONBOARDING.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -189,22 +189,16 @@ For Goland:
189189
* Then you can right-click on any test file or test case and "Run <test name>".
190190

191191

192-
193192
### Access database for homeserver after Complement test runs
194193

194+
If you're curious what the database looks like after you run some tests, here are some steps to get you going in Synapse:
195195

196-
For Synapse:
197-
198-
```
199-
# You can use `docker ps -f name=complement_` to just filter to the Complement containers
200-
$ docker ps
201-
$ docker exec -it complement_1_hs_with_application_service.hs1_2 /bin/bash
202-
203-
$ apt-get update && apt-get install -y sqlite3
204-
205-
$ sqlite3
206-
> .open /conf/homeserver.db
207-
```
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. Find the name of the container, `docker ps -f name=complement_` (this will filter for just the Compelement related Docker containers)
199+
1. Access the container replacing the name with what you found in the previous step: `docker exec -it complement_1_hs_with_application_service.hs1_2 /bin/bash`
200+
1. Install sqlite (database driver), `apt-get update && apt-get install -y sqlite3`
201+
1. Then run `sqlite3` and open the database `.open /conf/homeserver.db` (this db path comes from the Synapse homeserver.yaml)
208202

209203

210204
### What do I need to know if I'm coming from sytest?

0 commit comments

Comments
 (0)