|
@@ -77,7 +77,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 = client.VolumeCreate(context.Background(), volumetypes.VolumesCreateBody{Driver: "local"})
|
|
|
|
|
|
+ _, err = client.VolumeCreate(context.Background(), volumetypes.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)))
|
|
|
|
|
|
@@ -86,7 +86,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 = client.VolumeCreate(context.Background(), volumetypes.VolumesCreateBody{Driver: "local"})
|
|
|
|
|
|
+ _, err = client.VolumeCreate(context.Background(), volumetypes.VolumeCreateBody{Driver: "local"})
|
|
assert.NilError(t, err)
|
|
assert.NilError(t, err)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -104,7 +104,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 = client.VolumeCreate(context.Background(), volumetypes.VolumesCreateBody{Driver: "local"})
|
|
|
|
|
|
+ _, err = client.VolumeCreate(context.Background(), volumetypes.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)))
|
|
|
|
|