From 58db0a5b679be1d8935c88a681d827acde5b8592 Mon Sep 17 00:00:00 2001 From: Ferenc Szabo Date: Fri, 21 Sep 2018 11:24:45 +0200 Subject: [PATCH] cmd/swarm: respect --loglevel in run_test helpers When CLI tests were spanning new nodes, the log level verbosity was hard coded as 6. So the Swarm process was always polluting the test output with TRACE level logs. Now `go test -v ./cmd/swarm -loglevel 0` works as expected. --- cmd/swarm/run_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/swarm/run_test.go b/cmd/swarm/run_test.go index 3e766dc10d..fe3a36809c 100644 --- a/cmd/swarm/run_test.go +++ b/cmd/swarm/run_test.go @@ -241,7 +241,7 @@ func existingTestNode(t *testing.T, dir string, bzzaccount string) *testNode { "--bzzaccount", bzzaccount, "--bzznetworkid", "321", "--bzzport", httpPort, - "--verbosity", "6", + "--verbosity", fmt.Sprint(*loglevel), ) node.Cmd.InputLine(testPassphrase) defer func() { @@ -316,7 +316,7 @@ func newTestNode(t *testing.T, dir string) *testNode { "--bzzaccount", account.Address.String(), "--bzznetworkid", "321", "--bzzport", httpPort, - "--verbosity", "6", + "--verbosity", fmt.Sprint(*loglevel), ) node.Cmd.InputLine(testPassphrase) defer func() {