From e402601cf832bf605a2365ef02e7fc767952453d Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Tue, 5 Feb 2019 12:17:51 +0100 Subject: [PATCH] virtcontainers: Reduce sandbox test noise We need to set the sandbox context before calling into its API. Fixes: #1211 Signed-off-by: Samuel Ortiz --- virtcontainers/sandbox_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/virtcontainers/sandbox_test.go b/virtcontainers/sandbox_test.go index 39701332d..26c297953 100644 --- a/virtcontainers/sandbox_test.go +++ b/virtcontainers/sandbox_test.go @@ -1759,7 +1759,10 @@ func TestStartNetworkMonitor(t *testing.T) { } func TestSandboxStopStopped(t *testing.T) { - s := &Sandbox{state: types.State{State: types.StateStopped}} + s := &Sandbox{ + ctx: context.Background(), + state: types.State{State: types.StateStopped}, + } err := s.Stop() assert.Nil(t, err)