Commit 545df010 authored by acud's avatar acud Committed by GitHub

pkg: suppress logging in tests (#1401)

parent c8f0faad
...@@ -14,7 +14,6 @@ import ( ...@@ -14,7 +14,6 @@ import (
"io/ioutil" "io/ioutil"
"mime" "mime"
"net/http" "net/http"
"os"
"strings" "strings"
"testing" "testing"
...@@ -235,7 +234,7 @@ func TestFeedIndirection(t *testing.T) { ...@@ -235,7 +234,7 @@ func TestFeedIndirection(t *testing.T) {
client, _, _ = newTestServer(t, testServerOptions{ client, _, _ = newTestServer(t, testServerOptions{
Storer: storer, Storer: storer,
Tags: tags.NewTags(mockStatestore, logger), Tags: tags.NewTags(mockStatestore, logger),
Logger: logging.New(os.Stdout, 5), Logger: logging.New(ioutil.Discard, 0),
Feeds: factory, Feeds: factory,
}) })
_, err := storer.Put(ctx, storage.ModePutUpload, swarm.NewChunk(feedChunkAddr, feedChunkData)) _, err := storer.Put(ctx, storage.ModePutUpload, swarm.NewChunk(feedChunkAddr, feedChunkData))
......
...@@ -8,7 +8,7 @@ import ( ...@@ -8,7 +8,7 @@ import (
"bytes" "bytes"
"context" "context"
"fmt" "fmt"
"os" "io/ioutil"
"testing" "testing"
"time" "time"
...@@ -387,7 +387,7 @@ func TestHandler(t *testing.T) { ...@@ -387,7 +387,7 @@ func TestHandler(t *testing.T) {
func createPushSyncNode(t *testing.T, addr swarm.Address, recorder *streamtest.Recorder, unwrap func(swarm.Chunk), mockOpts ...mock.Option) (*pushsync.PushSync, *localstore.DB, *tags.Tags, accounting.Interface) { func createPushSyncNode(t *testing.T, addr swarm.Address, recorder *streamtest.Recorder, unwrap func(swarm.Chunk), mockOpts ...mock.Option) (*pushsync.PushSync, *localstore.DB, *tags.Tags, accounting.Interface) {
t.Helper() t.Helper()
logger := logging.New(os.Stdout, 5) logger := logging.New(ioutil.Discard, 0)
storer, err := localstore.New("", addr.Bytes(), nil, logger) storer, err := localstore.New("", addr.Bytes(), nil, logger)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment