Browse code

Exec inspect field should be "ID" not "ExecID"

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit cc993a9cbf40c1a94b5bada84f1d759b72df5c4e)
Signed-off-by: Brian Goff <cpuguy83@gmail.com>

Brian Goff authored on 2020/02/08 07:01:37
Showing 2 changed files
... ...
@@ -50,7 +50,7 @@ type ContainerCommitOptions struct {
50 50
 
51 51
 // ContainerExecInspect holds information returned by exec inspect.
52 52
 type ContainerExecInspect struct {
53
-	ExecID      string
53
+	ExecID      string `json:"ID"`
54 54
 	ContainerID string
55 55
 	Running     bool
56 56
 	ExitCode    int
... ...
@@ -102,6 +102,10 @@ func TestExec(t *testing.T) {
102 102
 	)
103 103
 	assert.NilError(t, err)
104 104
 
105
+	inspect, err := client.ContainerExecInspect(ctx, id.ID)
106
+	assert.NilError(t, err)
107
+	assert.Check(t, is.Equal(inspect.ExecID, id.ID))
108
+
105 109
 	resp, err := client.ContainerExecAttach(ctx, id.ID,
106 110
 		types.ExecStartCheck{
107 111
 			Detach: false,