summaryrefslogtreecommitdiff
path: root/testrig/config.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2023-01-17 13:29:44 +0100
committerLibravatar GitHub <noreply@github.com>2023-01-17 12:29:44 +0000
commit627b8eeae6b7e3ad11d2b5b0b3f9f46c4aca055f (patch)
tree2eddb361599bac9345147d1cbec7253e8229669b /testrig/config.go
parent[chore]: Bump codeberg.org/gruf/go-errors/v2 from 2.0.2 to 2.1.1 (#1346) (diff)
downloadgotosocial-627b8eeae6b7e3ad11d2b5b0b3f9f46c4aca055f.tar.xz
[feature] Tune sqlite pragmas (#1349)
* sqlite pragma tuning * use formatuint * add sqlite busy timeout * fix incorrect cache size format * update envparsing test * add sqlite tuning flags to cli * set sqlite timeout to 30s default
Diffstat (limited to 'testrig/config.go')
-rw-r--r--testrig/config.go19
1 files changed, 13 insertions, 6 deletions
diff --git a/testrig/config.go b/testrig/config.go
index fff9f8fd3..315e52bb9 100644
--- a/testrig/config.go
+++ b/testrig/config.go
@@ -19,6 +19,9 @@
package testrig
import (
+ "time"
+
+ "codeberg.org/gruf/go-bytesize"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/superseriousbusiness/gotosocial/internal/config"
)
@@ -43,12 +46,16 @@ var testDefaults = config.Configuration{
Port: 8080,
TrustedProxies: []string{"127.0.0.1/32", "::1"},
- DbType: "sqlite",
- DbAddress: ":memory:",
- DbPort: 5432,
- DbUser: "postgres",
- DbPassword: "postgres",
- DbDatabase: "postgres",
+ DbType: "sqlite",
+ DbAddress: ":memory:",
+ DbPort: 5432,
+ DbUser: "postgres",
+ DbPassword: "postgres",
+ DbDatabase: "postgres",
+ DbSqliteJournalMode: "WAL",
+ DbSqliteSynchronous: "NORMAL",
+ DbSqliteCacheSize: 64 * bytesize.MiB,
+ DbSqliteBusyTimeout: time.Second * 30,
WebTemplateBaseDir: "./web/template/",
WebAssetBaseDir: "./web/assets/",