From 4b74f4b0c45ec943973d8f5f570de5f6e849f7a1 Mon Sep 17 00:00:00 2001 From: postmannen Date: Wed, 1 Mar 2023 06:58:56 +0100 Subject: [PATCH] changed log level for tests --- requests_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/requests_test.go b/requests_test.go index 337ddb1..dc30a05 100644 --- a/requests_test.go +++ b/requests_test.go @@ -57,9 +57,6 @@ func TestMain(m *testing.M) { } func newServerForTesting(addressAndPort string, testFolder string) (*server, *Configuration) { - if !*logging { - log.SetOutput(io.Discard) - } // Start Steward instance // --------------------------------------- @@ -68,6 +65,9 @@ func newServerForTesting(addressAndPort string, testFolder string) (*server, *Co // Create the config to run a steward instance. //tempdir := "./tmp" conf := newConfigurationDefaults() + if *logging { + conf.LogLevel = "warning" + } conf.BrokerAddress = addressAndPort conf.NodeName = "central" conf.CentralNodeName = "central" @@ -78,7 +78,8 @@ func newServerForTesting(addressAndPort string, testFolder string) (*server, *Co conf.DatabaseFolder = testFolder conf.IsCentralErrorLogger = true conf.IsCentralAuth = true - conf.EnableDebug = true + conf.EnableDebug = false + conf.LogLevel = "none" stewardServer, err := NewServer(&conf, "test") if err != nil {