|
@@ -13,7 +13,7 @@ import (
|
|
|
|
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/api/types"
|
|
"github.com/docker/docker/api/types/filters"
|
|
"github.com/docker/docker/api/types/filters"
|
|
- volumetypes "github.com/docker/docker/api/types/volume"
|
|
|
|
|
|
+ "github.com/docker/docker/api/types/volume"
|
|
"github.com/docker/docker/client"
|
|
"github.com/docker/docker/client"
|
|
"github.com/docker/docker/integration/internal/container"
|
|
"github.com/docker/docker/integration/internal/container"
|
|
"github.com/docker/docker/integration/internal/requirement"
|
|
"github.com/docker/docker/integration/internal/requirement"
|
|
@@ -75,7 +75,7 @@ func TestAuthZPluginV2Disable(t *testing.T) {
|
|
d.Restart(t, "--authorization-plugin="+authzPluginNameWithTag)
|
|
d.Restart(t, "--authorization-plugin="+authzPluginNameWithTag)
|
|
d.LoadBusybox(t)
|
|
d.LoadBusybox(t)
|
|
|
|
|
|
- _, err = c.VolumeCreate(context.Background(), volumetypes.VolumeCreateBody{Driver: "local"})
|
|
|
|
|
|
+ _, err = c.VolumeCreate(context.Background(), volume.VolumeCreateBody{Driver: "local"})
|
|
assert.Assert(t, err != nil)
|
|
assert.Assert(t, err != nil)
|
|
assert.Assert(t, strings.Contains(err.Error(), fmt.Sprintf("Error response from daemon: plugin %s failed with error:", authzPluginNameWithTag)))
|
|
assert.Assert(t, strings.Contains(err.Error(), fmt.Sprintf("Error response from daemon: plugin %s failed with error:", authzPluginNameWithTag)))
|
|
|
|
|
|
@@ -84,7 +84,7 @@ func TestAuthZPluginV2Disable(t *testing.T) {
|
|
assert.NilError(t, err)
|
|
assert.NilError(t, err)
|
|
|
|
|
|
// now test to see if the docker api works.
|
|
// now test to see if the docker api works.
|
|
- _, err = c.VolumeCreate(context.Background(), volumetypes.VolumeCreateBody{Driver: "local"})
|
|
|
|
|
|
+ _, err = c.VolumeCreate(context.Background(), volume.VolumeCreateBody{Driver: "local"})
|
|
assert.NilError(t, err)
|
|
assert.NilError(t, err)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -101,7 +101,7 @@ func TestAuthZPluginV2RejectVolumeRequests(t *testing.T) {
|
|
// restart the daemon with the plugin
|
|
// restart the daemon with the plugin
|
|
d.Restart(t, "--authorization-plugin="+authzPluginNameWithTag)
|
|
d.Restart(t, "--authorization-plugin="+authzPluginNameWithTag)
|
|
|
|
|
|
- _, err = c.VolumeCreate(context.Background(), volumetypes.VolumeCreateBody{Driver: "local"})
|
|
|
|
|
|
+ _, err = c.VolumeCreate(context.Background(), volume.VolumeCreateBody{Driver: "local"})
|
|
assert.Assert(t, err != nil)
|
|
assert.Assert(t, err != nil)
|
|
assert.Assert(t, strings.Contains(err.Error(), fmt.Sprintf("Error response from daemon: plugin %s failed with error:", authzPluginNameWithTag)))
|
|
assert.Assert(t, strings.Contains(err.Error(), fmt.Sprintf("Error response from daemon: plugin %s failed with error:", authzPluginNameWithTag)))
|
|
|
|
|