Add testing log context
Enables showing debug logs in testing output. For integration tests the client log output will show in addition to daemon output, with timestamps for better correlation. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/log/logtest"
|
||||
"github.com/containerd/containerd/mount"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"github.com/containerd/containerd/pkg/testutil"
|
||||
@@ -71,7 +72,7 @@ func makeTest(name string, snapshotterFn func(ctx context.Context, root string)
|
||||
return func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
ctx := context.Background()
|
||||
ctx := logtest.WithT(context.Background(), t)
|
||||
ctx = namespaces.WithNamespace(ctx, "testsuite")
|
||||
// Make two directories: a snapshotter root and a play area for the tests:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user