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:
@@ -36,6 +36,7 @@ import (
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/containerd/containerd/gc"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/log/logtest"
|
||||
"github.com/containerd/containerd/namespaces"
|
||||
"github.com/containerd/containerd/snapshots"
|
||||
"github.com/containerd/containerd/snapshots/native"
|
||||
@@ -330,7 +331,7 @@ func TestMetadataCollector(t *testing.T) {
|
||||
defer cleanup()
|
||||
|
||||
var (
|
||||
ctx = context.Background()
|
||||
ctx = logtest.WithT(context.Background(), t)
|
||||
|
||||
objects = []object{
|
||||
blob(bytesFor(1), true),
|
||||
|
Reference in New Issue
Block a user