diff --git a/ONBOARDING.md b/ONBOARDING.md index a8028b21..153e5099 100644 --- a/ONBOARDING.md +++ b/ONBOARDING.md @@ -224,6 +224,18 @@ It can be useful to view the output of a test in Element to better debug somethi 1. Now you can visit http://localhost:7080/ and register a new user and explore the rooms from the test output +### Access database for homeserver after Complement test runs + +If you're curious what the database looks like after you run some tests, here are some steps to get you going in Synapse: + + 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 + 1. Start the Complement tests + 1. Find the name of the container, `docker ps -f name=complement_` (this will filter for just the Compelement related Docker containers) + 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` + 1. Install sqlite (database driver), `apt-get update && apt-get install -y sqlite3` + 1. Then run `sqlite3` and open the database `.open /conf/homeserver.db` (this db path comes from the Synapse homeserver.yaml) + + ### What do I need to know if I'm coming from sytest? Sytest has a concept of a `fixture` to configure the homeserver or test in a particular way, these are replaced with a `Blueprint` in Complement.