Skip to content

Commit

Permalink
Cleanup runtime tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Jenster <[email protected]>
  • Loading branch information
r10r committed Apr 20, 2021
1 parent b7ee3ce commit 14909d8
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,28 +330,13 @@ func testRuntime(t *testing.T, rt *Runtime, cfg *ContainerConfig) {
require.NoError(t, err)
require.Equal(t, specs.StateRunning, state.SpecState.Status)

time.Sleep(time.Millisecond * 500)

// SIGHUP by default terminates a process if it is not ignored or catched by
// a signal handler
err = rt.Kill(ctx, c, unix.SIGKILL)
require.NoError(t, err)

time.Sleep(time.Millisecond * 50)

state, err = c.State()
require.NoError(t, err)
require.Equal(t, specs.StateStopped, state.SpecState.Status)

err = rt.Delete(ctx, c.ContainerID, false)
err = rt.Delete(ctx, c.ContainerID, true)
require.NoError(t, err)

state, err = c.State()
require.NoError(t, err)
require.Equal(t, specs.StateStopped, state.SpecState.Status)

t.Log("done")

err = c.Release()
require.NoError(t, err)
}

0 comments on commit 14909d8

Please sign in to comment.