0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 00:23:44 +01:00

Try to use in-memory for CI

This commit is contained in:
Neil Alexander 2021-07-14 15:25:15 +01:00
parent ee6bfe24f5
commit 0f65b8a621
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 8 deletions

View file

@ -70,6 +70,7 @@ func main() {
// don't hit matrix.org when running tests!!!
cfg.SigningKeyServer.KeyPerspectives = config.KeyPerspectives{}
cfg.UserAPI.BCryptCost = bcrypt.MinCost
cfg.Global.JetStream.InMemory = true
}
j, err := yaml.Marshal(cfg)

View file

@ -2,8 +2,6 @@ package config
import (
"fmt"
"log"
"regexp"
)
type JetStream struct {
@ -18,7 +16,7 @@ type JetStream struct {
// useful if running more than one Dendrite on the same NATS deployment.
TopicPrefix string `yaml:"topic_prefix"`
// Keep all storage in memory. This is mostly useful for unit tests.
InMemory bool `yaml:"-"`
InMemory bool `yaml:"in_memory"`
}
func (c *JetStream) TopicFor(name string) string {
@ -28,11 +26,7 @@ func (c *JetStream) TopicFor(name string) string {
func (c *JetStream) Defaults() {
c.Addresses = []string{}
c.TopicPrefix = "Dendrite"
reg, err := regexp.Compile(`[^a-zA-Z0-9\.]+`)
if err != nil {
log.Fatal(err)
}
c.StoragePath = Path("./" + reg.ReplaceAllString(string(c.Matrix.ServerName), ""))
c.StoragePath = Path("./")
}
func (c *JetStream) Verify(configErrs *ConfigErrors, isMonolith bool) {