MCPcopy
hub / github.com/moby/moby / killContainerProcess

Function killContainerProcess

integration/container/restart_test.go:290–297  ·  view source on GitHub ↗
(ctx context.Context, t *testing.T, apiClient client.APIClient, containerID string)

Source from the content-addressed store, hash-verified

288}
289
290func killContainerProcess(ctx context.Context, t *testing.T, apiClient client.APIClient, containerID string) {
291 t.Helper()
292
293 inspect, err := apiClient.ContainerInspect(ctx, containerID, client.ContainerInspectOptions{})
294 assert.NilError(t, err)
295
296 assert.NilError(t, process.Kill(inspect.Container.State.Pid))
297}
298
299func assertContainerExitCode(t *testing.T, wait client.ContainerWaitResult, expected int64, timeout time.Duration) {
300 t.Helper()

Calls 3

KillFunction · 0.92
HelperMethod · 0.65
ContainerInspectMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…