Browse code

Remove reference to old Volumes field in inspect struct.

Signed-off-by: David Calavera <david.calavera@gmail.com>

David Calavera authored on 2015/07/24 07:11:06
Showing 1 changed files
... ...
@@ -368,10 +368,9 @@ func (s *DockerSuite) TestRunCreateVolumeWithSymlink(c *check.C) {
368 368
 		c.Fatalf("[run] err: %v, exitcode: %d", err, exitCode)
369 369
 	}
370 370
 
371
-	var volPath string
372
-	volPath, exitCode, err = dockerCmdWithError(c, "inspect", "-f", "{{range .Volumes}}{{.}}{{end}}", "test-createvolumewithsymlink")
373
-	if err != nil || exitCode != 0 {
374
-		c.Fatalf("[inspect] err: %v, exitcode: %d", err, exitCode)
371
+	volPath, err := inspectMountSourceField("test-createvolumewithsymlink", "/bar/foo")
372
+	if err != nil {
373
+		c.Fatalf("[inspect] err: %v", err)
375 374
 	}
376 375
 
377 376
 	_, exitCode, err = dockerCmdWithError(c, "rm", "-v", "test-createvolumewithsymlink")
... ...
@@ -379,8 +378,7 @@ func (s *DockerSuite) TestRunCreateVolumeWithSymlink(c *check.C) {
379 379
 		c.Fatalf("[rm] err: %v, exitcode: %d", err, exitCode)
380 380
 	}
381 381
 
382
-	f, err := os.Open(volPath)
383
-	defer f.Close()
382
+	_, err = os.Stat(volPath)
384 383
 	if !os.IsNotExist(err) {
385 384
 		c.Fatalf("[open] (expecting 'file does not exist' error) err: %v, volPath: %s", err, volPath)
386 385
 	}