diff options
| author | 2025-07-09 17:25:45 +0200 | |
|---|---|---|
| committer | 2025-07-09 17:25:45 +0200 | |
| commit | 352353ce7a33c3ac26fbecd597ab24ae2f9c9864 (patch) | |
| tree | eeea288eea02162ff25e54c9052eaffd705cb5ad /testrig | |
| parent | [feature] Use `hidesToPublicFromUnauthedWeb` and `hidesCcPublicFromUnauthedWe... (diff) | |
| download | gotosocial-352353ce7a33c3ac26fbecd597ab24ae2f9c9864.tar.xz | |
[chore/testing] Add env vars to skip testrig setup/teardown (#4317)
Add flags to skip local testrig db setup and teardown, to allow somewhat easier testing of migrations. Documents env vars available to the testrig.
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4317
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
Diffstat (limited to 'testrig')
| -rw-r--r-- | testrig/config.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/testrig/config.go b/testrig/config.go index 8d1c6581d..fdc026e61 100644 --- a/testrig/config.go +++ b/testrig/config.go @@ -128,7 +128,7 @@ func testDefaults() config.Configuration { ThumbMaxPixels: 512, }, - // the testrig only uses in-memory storage, so we can + // the testrig uses in-memory storage by default, so we can // safely set this value to 'test' to avoid running storage // migrations, and other silly things like that StorageBackend: "test", @@ -191,6 +191,10 @@ func testDefaults() config.Configuration { // simply use cache defaults. Cache: config.Defaults.Cache, + + // Testrig-specific flags. + TestrigSkipDBSetup: envBool("GTS_TESTRIG_SKIP_DB_SETUP", false), + TestrigSkipDBTeardown: envBool("GTS_TESTRIG_SKIP_DB_TEARDOWN", false), } } |
