Do not touch grpc logger from within the packages

Libraries should not make process wide changes unless requested to.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure
2017-08-04 09:45:09 -07:00
parent 7e0063320c
commit 16f6e0944a
7 changed files with 20 additions and 20 deletions

View File

@@ -5,6 +5,8 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
golog "log"
"os"
"os/exec"
"runtime"
@@ -12,6 +14,8 @@ import (
"testing"
"time"
"google.golang.org/grpc/grpclog"
"github.com/containerd/containerd/log"
"github.com/containerd/containerd/namespaces"
"github.com/containerd/containerd/testutil"
@@ -26,6 +30,9 @@ var (
)
func init() {
// Discard grpc logs so that they don't mess with our stdio
grpclog.SetLogger(golog.New(ioutil.Discard, "", golog.LstdFlags))
flag.StringVar(&address, "address", defaultAddress, "The address to the containerd socket for use in the tests")
flag.BoolVar(&noDaemon, "no-daemon", false, "Do not start a dedicated daemon for the tests")
flag.BoolVar(&noCriu, "no-criu", false, "Do not run the checkpoint tests")