-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Optionally use an on-disk sqlite db in tests #11702
Changes from 3 commits
b538f33
9114f2b
6c1a8dd
47e07c2
24c50d5
1753a6b
547874a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add the option to write sqlite test dbs to disk when running tests. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,6 +42,10 @@ | |
| POSTGRES_PASSWORD = os.environ.get("SYNAPSE_POSTGRES_PASSWORD", None) | ||
| POSTGRES_BASE_DB = "_synapse_unit_tests_base_%s" % (os.getpid(),) | ||
|
|
||
| # When debugging a specific test, it's occasionally useful to write the | ||
| # DB to disk and query it with the sqlite CLI. | ||
| SQLITE_PERSIST_DB = os.environ.get("SYNAPSE_TEST_PERSIST_SQLITE_DB") is not None | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I usually do
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why Come to think of it, maybe I could do
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It makes This is only really useful if you want to ensure that |
||
|
|
||
| # the dbname we will connect to in order to create the base database. | ||
| POSTGRES_DBNAME_FOR_INITIAL_CREATE = "postgres" | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.