@@ -7,27 +7,27 @@ import (
77 "testing"
88
99 "github.com/docker/cli/internal/test"
10- "github.com/moby/moby/api/types"
10+ "github.com/moby/moby/api/types/plugin "
1111 "gotest.tools/v3/assert"
1212 "gotest.tools/v3/golden"
1313)
1414
15- var pluginFoo = & types .Plugin {
15+ var pluginFoo = & plugin .Plugin {
1616 ID : "id-foo" ,
1717 Name : "name-foo" ,
18- Config : types. PluginConfig {
18+ Config : plugin. Config {
1919 Description : "plugin foo description" ,
2020 DockerVersion : "17.12.1-ce" ,
2121 Documentation : "plugin foo documentation" ,
2222 Entrypoint : []string {"/foo" },
23- Interface : types. PluginConfigInterface {
23+ Interface : plugin. Interface {
2424 Socket : "plugin-foo.sock" ,
2525 },
26- Linux : types. PluginConfigLinux {
26+ Linux : plugin. LinuxConfig {
2727 Capabilities : []string {"CAP_SYS_ADMIN" },
2828 },
2929 WorkDir : "workdir-foo" ,
30- Rootfs : & types. PluginConfigRootfs {
30+ Rootfs : & plugin. RootFS {
3131 DiffIds : []string {"sha256:deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" },
3232 Type : "layers" ,
3333 },
@@ -40,7 +40,7 @@ func TestInspectErrors(t *testing.T) {
4040 args []string
4141 flags map [string ]string
4242 expectedError string
43- inspectFunc func (name string ) (* types .Plugin , []byte , error )
43+ inspectFunc func (name string ) (* plugin .Plugin , []byte , error )
4444 }{
4545 {
4646 description : "too few arguments" ,
@@ -51,7 +51,7 @@ func TestInspectErrors(t *testing.T) {
5151 description : "error inspecting plugin" ,
5252 args : []string {"foo" },
5353 expectedError : "error inspecting plugin" ,
54- inspectFunc : func (name string ) (* types .Plugin , []byte , error ) {
54+ inspectFunc : func (name string ) (* plugin .Plugin , []byte , error ) {
5555 return nil , nil , errors .New ("error inspecting plugin" )
5656 },
5757 },
@@ -86,7 +86,7 @@ func TestInspect(t *testing.T) {
8686 args []string
8787 flags map [string ]string
8888 golden string
89- inspectFunc func (name string ) (* types .Plugin , []byte , error )
89+ inspectFunc func (name string ) (* plugin .Plugin , []byte , error )
9090 }{
9191 {
9292 description : "inspect single plugin with format" ,
@@ -95,8 +95,8 @@ func TestInspect(t *testing.T) {
9595 "format" : "{{ .Name }}" ,
9696 },
9797 golden : "plugin-inspect-single-with-format.golden" ,
98- inspectFunc : func (name string ) (* types .Plugin , []byte , error ) {
99- return & types .Plugin {
98+ inspectFunc : func (name string ) (* plugin .Plugin , []byte , error ) {
99+ return & plugin .Plugin {
100100 ID : "id-foo" ,
101101 Name : "name-foo" ,
102102 }, []byte {}, nil
@@ -106,7 +106,7 @@ func TestInspect(t *testing.T) {
106106 description : "inspect single plugin without format" ,
107107 args : []string {"foo" },
108108 golden : "plugin-inspect-single-without-format.golden" ,
109- inspectFunc : func (name string ) (* types .Plugin , []byte , error ) {
109+ inspectFunc : func (name string ) (* plugin .Plugin , []byte , error ) {
110110 return pluginFoo , nil , nil
111111 },
112112 },
@@ -117,15 +117,15 @@ func TestInspect(t *testing.T) {
117117 "format" : "{{ .Name }}" ,
118118 },
119119 golden : "plugin-inspect-multiple-with-format.golden" ,
120- inspectFunc : func (name string ) (* types .Plugin , []byte , error ) {
120+ inspectFunc : func (name string ) (* plugin .Plugin , []byte , error ) {
121121 switch name {
122122 case "foo" :
123- return & types .Plugin {
123+ return & plugin .Plugin {
124124 ID : "id-foo" ,
125125 Name : "name-foo" ,
126126 }, []byte {}, nil
127127 case "bar" :
128- return & types .Plugin {
128+ return & plugin .Plugin {
129129 ID : "id-bar" ,
130130 Name : "name-bar" ,
131131 }, []byte {}, nil
0 commit comments