This feature is no longer experimental, and should
now work on Windows too
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| 1 | 1 |
deleted file mode 100644 |
| ... | ... |
@@ -1,33 +0,0 @@ |
| 1 |
-// +build experimental |
|
| 2 |
- |
|
| 3 |
-package main |
|
| 4 |
- |
|
| 5 |
-import ( |
|
| 6 |
- "github.com/docker/docker/pkg/integration/checker" |
|
| 7 |
- "github.com/docker/engine-api/types" |
|
| 8 |
- "github.com/go-check/check" |
|
| 9 |
-) |
|
| 10 |
- |
|
| 11 |
-func (s *DockerSuite) TestInspectNamedMountPoint(c *check.C) {
|
|
| 12 |
- testRequires(c, DaemonIsLinux) |
|
| 13 |
- dockerCmd(c, "run", "-d", "--name", "test", "-v", "data:/data", "busybox", "cat") |
|
| 14 |
- |
|
| 15 |
- vol := inspectFieldJSON(c, "test", "Mounts") |
|
| 16 |
- |
|
| 17 |
- var mp []types.MountPoint |
|
| 18 |
- err := unmarshalJSON([]byte(vol), &mp) |
|
| 19 |
- c.Assert(err, checker.IsNil) |
|
| 20 |
- |
|
| 21 |
- c.Assert(mp, checker.HasLen, 1, check.Commentf("Expected 1 mount point"))
|
|
| 22 |
- |
|
| 23 |
- m := mp[0] |
|
| 24 |
- c.Assert(m.Name, checker.Equals, "data", check.Commentf("Expected name data"))
|
|
| 25 |
- |
|
| 26 |
- c.Assert(m.Driver, checker.Equals, "local", check.Commentf("Expected driver local"))
|
|
| 27 |
- |
|
| 28 |
- c.Assert(m.Source, checker.Not(checker.Equals), "", check.Commentf("Expected source to not be empty"))
|
|
| 29 |
- |
|
| 30 |
- c.Assert(m.RW, checker.Equals, true) |
|
| 31 |
- |
|
| 32 |
- c.Assert(m.Destination, checker.Equals, "/data", check.Commentf("Expected destination /data"))
|
|
| 33 |
-} |
| ... | ... |
@@ -245,6 +245,29 @@ func (s *DockerSuite) TestInspectBindMountPoint(c *check.C) {
|
| 245 | 245 |
c.Assert(m.RW, checker.Equals, false) |
| 246 | 246 |
} |
| 247 | 247 |
|
| 248 |
+func (s *DockerSuite) TestInspectNamedMountPoint(c *check.C) {
|
|
| 249 |
+ prefix, slash := getPrefixAndSlashFromDaemonPlatform() |
|
| 250 |
+ |
|
| 251 |
+ dockerCmd(c, "run", "-d", "--name", "test", "-v", "data:"+prefix+slash+"data", "busybox", "cat") |
|
| 252 |
+ |
|
| 253 |
+ vol := inspectFieldJSON(c, "test", "Mounts") |
|
| 254 |
+ |
|
| 255 |
+ var mp []types.MountPoint |
|
| 256 |
+ err := unmarshalJSON([]byte(vol), &mp) |
|
| 257 |
+ c.Assert(err, checker.IsNil) |
|
| 258 |
+ |
|
| 259 |
+ // check that there is only one mountpoint |
|
| 260 |
+ c.Assert(mp, checker.HasLen, 1) |
|
| 261 |
+ |
|
| 262 |
+ m := mp[0] |
|
| 263 |
+ |
|
| 264 |
+ c.Assert(m.Name, checker.Equals, "data") |
|
| 265 |
+ c.Assert(m.Driver, checker.Equals, "local") |
|
| 266 |
+ c.Assert(m.Source, checker.Not(checker.Equals), "") |
|
| 267 |
+ c.Assert(m.Destination, checker.Equals, prefix+slash+"data") |
|
| 268 |
+ c.Assert(m.RW, checker.Equals, true) |
|
| 269 |
+} |
|
| 270 |
+ |
|
| 248 | 271 |
// #14947 |
| 249 | 272 |
func (s *DockerSuite) TestInspectTimesAsRFC3339Nano(c *check.C) {
|
| 250 | 273 |
testRequires(c, DaemonIsLinux) |