Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit f096143

Browse files
authored
Merge pull request #40476 from cpuguy83/19.03_fix_exec_id_client
[19.03] Exec inspect field should be "ID" not "ExecID" Upstream-commit: 498fbecafd8cf0e03f775f8a23a786ef4955387d Component: engine
2 parents 1aa048b + 499e12d commit f096143

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

components/engine/api/types/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type ContainerCommitOptions struct {
5050

5151
// ContainerExecInspect holds information returned by exec inspect.
5252
type ContainerExecInspect struct {
53-
ExecID string
53+
ExecID string `json:"ID"`
5454
ContainerID string
5555
Running bool
5656
ExitCode int

components/engine/integration/container/exec_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ func TestExec(t *testing.T) {
102102
)
103103
assert.NilError(t, err)
104104

105+
inspect, err := client.ContainerExecInspect(ctx, id.ID)
106+
assert.NilError(t, err)
107+
assert.Check(t, is.Equal(inspect.ExecID, id.ID))
108+
105109
resp, err := client.ContainerExecAttach(ctx, id.ID,
106110
types.ExecStartCheck{
107111
Detach: false,

0 commit comments

Comments
 (0)