From 5aa1d7827c0090bde523c4a05a6145f3ea1a8462 Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Tue, 2 Aug 2022 11:59:22 +0200 Subject: [PATCH] Disable NATS Server logs in CI --- setup/config/config_jetstream.go | 3 +++ setup/jetstream/nats.go | 1 + 2 files changed, 4 insertions(+) diff --git a/setup/config/config_jetstream.go b/setup/config/config_jetstream.go index e4cfd4d3b..49d2a5dcc 100644 --- a/setup/config/config_jetstream.go +++ b/setup/config/config_jetstream.go @@ -17,6 +17,8 @@ type JetStream struct { TopicPrefix string `yaml:"topic_prefix"` // Keep all storage in memory. This is mostly useful for unit tests. InMemory bool `yaml:"in_memory"` + // Disable logging. This is mostly useful for unit tests. + NoLog bool `yaml:"-"` } func (c *JetStream) Prefixed(name string) string { @@ -32,6 +34,7 @@ func (c *JetStream) Defaults(generate bool) { c.TopicPrefix = "Dendrite" if generate { c.StoragePath = Path("./") + c.NoLog = true } } diff --git a/setup/jetstream/nats.go b/setup/jetstream/nats.go index 248b0e656..5d6a54ec3 100644 --- a/setup/jetstream/nats.go +++ b/setup/jetstream/nats.go @@ -45,6 +45,7 @@ func (s *NATSInstance) Prepare(process *process.ProcessContext, cfg *config.JetS NoSystemAccount: true, MaxPayload: 16 * 1024 * 1024, NoSigs: true, + NoLog: cfg.NoLog, }) if err != nil { panic(err)