mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-27 00:31:55 -06:00
Try to use in-memory for CI
This commit is contained in:
parent
ee6bfe24f5
commit
0f65b8a621
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue