mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-23 06:41:56 -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!!!
|
// don't hit matrix.org when running tests!!!
|
||||||
cfg.SigningKeyServer.KeyPerspectives = config.KeyPerspectives{}
|
cfg.SigningKeyServer.KeyPerspectives = config.KeyPerspectives{}
|
||||||
cfg.UserAPI.BCryptCost = bcrypt.MinCost
|
cfg.UserAPI.BCryptCost = bcrypt.MinCost
|
||||||
|
cfg.Global.JetStream.InMemory = true
|
||||||
}
|
}
|
||||||
|
|
||||||
j, err := yaml.Marshal(cfg)
|
j, err := yaml.Marshal(cfg)
|
||||||
|
|
|
@ -2,8 +2,6 @@ package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
|
||||||
"regexp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type JetStream struct {
|
type JetStream struct {
|
||||||
|
@ -18,7 +16,7 @@ type JetStream struct {
|
||||||
// useful if running more than one Dendrite on the same NATS deployment.
|
// useful if running more than one Dendrite on the same NATS deployment.
|
||||||
TopicPrefix string `yaml:"topic_prefix"`
|
TopicPrefix string `yaml:"topic_prefix"`
|
||||||
// Keep all storage in memory. This is mostly useful for unit tests.
|
// 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 {
|
func (c *JetStream) TopicFor(name string) string {
|
||||||
|
@ -28,11 +26,7 @@ func (c *JetStream) TopicFor(name string) string {
|
||||||
func (c *JetStream) Defaults() {
|
func (c *JetStream) Defaults() {
|
||||||
c.Addresses = []string{}
|
c.Addresses = []string{}
|
||||||
c.TopicPrefix = "Dendrite"
|
c.TopicPrefix = "Dendrite"
|
||||||
reg, err := regexp.Compile(`[^a-zA-Z0-9\.]+`)
|
c.StoragePath = Path("./")
|
||||||
if err != nil {
|
|
||||||
log.Fatal(err)
|
|
||||||
}
|
|
||||||
c.StoragePath = Path("./" + reg.ReplaceAllString(string(c.Matrix.ServerName), ""))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *JetStream) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
func (c *JetStream) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
||||||
|
|
Loading…
Reference in a new issue