Remove reference to old Volumes field in inspect struct.
| ... | ... |
@@ -379,10 +379,9 @@ func (s *DockerSuite) TestRunCreateVolumeWithSymlink(c *check.C) {
|
| 379 | 379 |
c.Fatalf("[run] err: %v, exitcode: %d", err, exitCode)
|
| 380 | 380 |
} |
| 381 | 381 |
|
| 382 |
- var volPath string |
|
| 383 |
- volPath, exitCode, err = dockerCmdWithError(c, "inspect", "-f", "{{range .Volumes}}{{.}}{{end}}", "test-createvolumewithsymlink")
|
|
| 384 |
- if err != nil || exitCode != 0 {
|
|
| 385 |
- c.Fatalf("[inspect] err: %v, exitcode: %d", err, exitCode)
|
|
| 382 |
+ volPath, err := inspectMountSourceField("test-createvolumewithsymlink", "/bar/foo")
|
|
| 383 |
+ if err != nil {
|
|
| 384 |
+ c.Fatalf("[inspect] err: %v", err)
|
|
| 386 | 385 |
} |
| 387 | 386 |
|
| 388 | 387 |
_, exitCode, err = dockerCmdWithError(c, "rm", "-v", "test-createvolumewithsymlink") |
| ... | ... |
@@ -390,8 +389,7 @@ func (s *DockerSuite) TestRunCreateVolumeWithSymlink(c *check.C) {
|
| 390 | 390 |
c.Fatalf("[rm] err: %v, exitcode: %d", err, exitCode)
|
| 391 | 391 |
} |
| 392 | 392 |
|
| 393 |
- f, err := os.Open(volPath) |
|
| 394 |
- defer f.Close() |
|
| 393 |
+ _, err = os.Stat(volPath) |
|
| 395 | 394 |
if !os.IsNotExist(err) {
|
| 396 | 395 |
c.Fatalf("[open] (expecting 'file does not exist' error) err: %v, volPath: %s", err, volPath)
|
| 397 | 396 |
} |