Config tweaks, make random jetstream storage path for CI

This commit is contained in:
Neil Alexander 2021-07-14 14:26:14 +01:00
parent be60a3bda4
commit 74735e7cd5
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 12 additions and 8 deletions

View file

@ -1,6 +1,8 @@
package main
import (
"crypto/rand"
"encoding/hex"
"flag"
"fmt"
@ -70,6 +72,9 @@ func main() {
// don't hit matrix.org when running tests!!!
cfg.SigningKeyServer.KeyPerspectives = config.KeyPerspectives{}
cfg.UserAPI.BCryptCost = bcrypt.MinCost
var id [8]byte
_, _ = rand.Read(id[:])
cfg.Global.JetStream.StoragePath = config.Path(hex.EncodeToString(id[:]))
}
j, err := yaml.Marshal(cfg)