mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
api/types/container: introduce ExecCreateResponse type
Introduce a container.ExecCreateResponse type as alias for IDResponse to allow consumers to use ContainerCommit without having to import the "types" package, and allows us to differentiate the response for container commit separate from other endpoints currently using IDResponse. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"github.com/docker/docker/errdefs"
|
||||
"gotest.tools/v3/assert"
|
||||
@@ -67,7 +66,7 @@ func TestContainerExecCreate(t *testing.T) {
|
||||
if execConfig.User != "user" {
|
||||
return nil, fmt.Errorf("expected an execConfig with User == 'user', got %v", execConfig)
|
||||
}
|
||||
b, err := json.Marshal(types.IDResponse{
|
||||
b, err := json.Marshal(container.ExecCreateResponse{
|
||||
ID: "exec_id",
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user