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.
This commit is contained in:
Ferenc Szabo 2018-09-21 11:24:45 +02:00
parent 1d9d3815e5
commit 58db0a5b67

View file

@ -241,7 +241,7 @@ func existingTestNode(t *testing.T, dir string, bzzaccount string) *testNode {
"--bzzaccount", bzzaccount, "--bzzaccount", bzzaccount,
"--bzznetworkid", "321", "--bzznetworkid", "321",
"--bzzport", httpPort, "--bzzport", httpPort,
"--verbosity", "6", "--verbosity", fmt.Sprint(*loglevel),
) )
node.Cmd.InputLine(testPassphrase) node.Cmd.InputLine(testPassphrase)
defer func() { defer func() {
@ -316,7 +316,7 @@ func newTestNode(t *testing.T, dir string) *testNode {
"--bzzaccount", account.Address.String(), "--bzzaccount", account.Address.String(),
"--bzznetworkid", "321", "--bzznetworkid", "321",
"--bzzport", httpPort, "--bzzport", httpPort,
"--verbosity", "6", "--verbosity", fmt.Sprint(*loglevel),
) )
node.Cmd.InputLine(testPassphrase) node.Cmd.InputLine(testPassphrase)
defer func() { defer func() {