33package main
44
55import (
6- "os"
7- "path/filepath"
86 "strings"
97
108 "github.com/docker/docker/integration-cli/checker"
@@ -199,12 +197,6 @@ func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
199197 if err != nil {
200198 c .Fatalf ("Could not install plugin: %v %s" , err , out )
201199 }
202- pluginID , err := s .d .Cmd ("plugin" , "inspect" , "-f" , "{{.Id}}" , pName )
203- pluginID = strings .TrimSpace (pluginID )
204- if err != nil {
205- c .Fatalf ("Could not retrieve plugin ID: %v %s" , err , pluginID )
206- }
207- mountpointPrefix := filepath .Join (s .d .RootDir (), "plugins" , pluginID , "rootfs" )
208200 defer func () {
209201 if out , err := s .d .Cmd ("plugin" , "disable" , pName ); err != nil {
210202 c .Fatalf ("Could not disable plugin: %v %s" , err , out )
@@ -213,11 +205,6 @@ func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
213205 if out , err := s .d .Cmd ("plugin" , "remove" , pName ); err != nil {
214206 c .Fatalf ("Could not remove plugin: %v %s" , err , out )
215207 }
216-
217- exists , err := existsMountpointWithPrefix (mountpointPrefix )
218- c .Assert (err , checker .IsNil )
219- c .Assert (exists , checker .Equals , false )
220-
221208 }()
222209
223210 out , err = s .d .Cmd ("volume" , "create" , "-d" , pName , volName )
@@ -237,21 +224,11 @@ func (s *DockerDaemonSuite) TestVolumePlugin(c *check.C) {
237224 c .Assert (out , checker .Contains , volName )
238225 c .Assert (out , checker .Contains , pName )
239226
240- mountPoint , err := s .d .Cmd ("volume" , "inspect" , volName , "--format" , "{{.Mountpoint}}" )
241- if err != nil {
242- c .Fatalf ("Could not inspect volume: %v %s" , err , mountPoint )
243- }
244- mountPoint = strings .TrimSpace (mountPoint )
245-
246227 out , err = s .d .Cmd ("run" , "--rm" , "-v" , volName + ":" + destDir , "busybox" , "touch" , destDir + destFile )
247228 c .Assert (err , checker .IsNil , check .Commentf (out ))
248- path := filepath .Join (s .d .RootDir (), "plugins" , pluginID , "rootfs" , mountPoint , destFile )
249- _ , err = os .Lstat (path )
250- c .Assert (err , checker .IsNil )
251229
252- exists , err := existsMountpointWithPrefix (mountpointPrefix )
253- c .Assert (err , checker .IsNil )
254- c .Assert (exists , checker .Equals , true )
230+ out , err = s .d .Cmd ("run" , "--rm" , "-v" , volName + ":" + destDir , "busybox" , "ls" , destDir + destFile )
231+ c .Assert (err , checker .IsNil , check .Commentf (out ))
255232}
256233
257234func (s * DockerDaemonSuite ) TestGraphdriverPlugin (c * check.C ) {
0 commit comments