mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
delete plugin rootfs on plugin rm
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
1c62d8619d
commit
586b7cc19e
2 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,7 @@ func (s *DockerSuite) TestPluginBasicOps(c *check.C) {
|
||||||
c.Assert(out, checker.Contains, "true")
|
c.Assert(out, checker.Contains, "true")
|
||||||
|
|
||||||
id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
|
id, _, err := dockerCmdWithError("plugin", "inspect", "-f", "{{.Id}}", pNameWithTag)
|
||||||
|
id = strings.TrimSpace(id)
|
||||||
c.Assert(err, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
|
|
||||||
out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
|
out, _, err = dockerCmdWithError("plugin", "remove", pNameWithTag)
|
||||||
|
|
|
@ -162,6 +162,7 @@ func (pm *Manager) Remove(name string, config *types.PluginRmConfig) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
pm.pluginStore.Remove(p)
|
pm.pluginStore.Remove(p)
|
||||||
|
os.RemoveAll(filepath.Join(pm.libRoot, p.GetID()))
|
||||||
pm.pluginEventLogger(p.GetID(), name, "remove")
|
pm.pluginEventLogger(p.GetID(), name, "remove")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue