From 1b8e9a131cd41db1a731d827ce4a75ca41c56a6b Mon Sep 17 00:00:00 2001 From: Brian Goff Date: Fri, 7 Feb 2020 14:01:37 -0800 Subject: [PATCH] Exec inspect field should be "ID" not "ExecID" Signed-off-by: Brian Goff (cherry picked from commit cc993a9cbf40c1a94b5bada84f1d759b72df5c4e) Signed-off-by: Brian Goff --- api/types/client.go | 2 +- integration/container/exec_test.go | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/api/types/client.go b/api/types/client.go index 4b9f50282b..fe90617eec 100644 --- a/api/types/client.go +++ b/api/types/client.go @@ -50,7 +50,7 @@ type ContainerCommitOptions struct { // ContainerExecInspect holds information returned by exec inspect. type ContainerExecInspect struct { - ExecID string + ExecID string `json:"ID"` ContainerID string Running bool ExitCode int diff --git a/integration/container/exec_test.go b/integration/container/exec_test.go index 392b5bb688..8798ea94ba 100644 --- a/integration/container/exec_test.go +++ b/integration/container/exec_test.go @@ -102,6 +102,10 @@ func TestExec(t *testing.T) { ) assert.NilError(t, err) + inspect, err := client.ContainerExecInspect(ctx, id.ID) + assert.NilError(t, err) + assert.Check(t, is.Equal(inspect.ExecID, id.ID)) + resp, err := client.ContainerExecAttach(ctx, id.ID, types.ExecStartCheck{ Detach: false,