summaryrefslogtreecommitdiff
path: root/volume/mounts
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2018-09-28 12:09:52 +0200
committerSebastiaan van Stijn <github@gone.nl>2018-09-28 12:18:58 +0200
commit574db7a53782c57554089c9606505af1c108df0b (patch)
tree10310cd86103eb410ed78b70d2135322cad43867 /volume/mounts
parent147499a14ca91122fcabb11373ef36057b7ba9e3 (diff)
downloaddocker-574db7a53782c57554089c9606505af1c108df0b.tar.gz
Tweak bind mount errors
These messages were enhanced to include the path that was missing (in df6af282b9048dfedcd7b7a9a89126aca887f4e1), but also changed the first part of the message. This change complicates running e2e tests with mixed versions of the engine. Looking at the full error message, "mount" is a bit redundant as well, because the error message already indicates this is about a "mount"; docker run --rm --mount type=bind,source=/no-such-thing,target=/foo busybox docker: Error response from daemon: invalid mount config for type "bind": bind mount source path does not exist: /no-such-thing. Removing the "mount" part from the error message, because it was redundant, and makes cross-version testing easier :) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'volume/mounts')
-rw-r--r--volume/mounts/parser_test.go4
-rw-r--r--volume/mounts/validate.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/volume/mounts/parser_test.go b/volume/mounts/parser_test.go
index 347f7d9c4d..27257d62bd 100644
--- a/volume/mounts/parser_test.go
+++ b/volume/mounts/parser_test.go
@@ -120,7 +120,7 @@ func TestParseMountRaw(t *testing.T) {
`c:\:d:\:xyzzy`: "invalid volume specification: ",
`c:`: "cannot be `c:`",
`c:\`: "cannot be `c:`",
- `c:\notexist:d:`: `bind mount source path does not exist: c:\notexist`,
+ `c:\notexist:d:`: `source path does not exist: c:\notexist`,
`c:\windows\system32\ntdll.dll:d:`: `source path must be a directory`,
`name<:d:`: `invalid volume specification`,
`name>:d:`: `invalid volume specification`,
@@ -189,7 +189,7 @@ func TestParseMountRaw(t *testing.T) {
`c:\:/foo:xyzzy`: "invalid volume specification: ",
`/`: "destination can't be '/'",
`/..`: "destination can't be '/'",
- `c:\notexist:/foo`: `bind mount source path does not exist: c:\notexist`,
+ `c:\notexist:/foo`: `source path does not exist: c:\notexist`,
`c:\windows\system32\ntdll.dll:/foo`: `source path must be a directory`,
`name<:/foo`: `invalid volume specification`,
`name>:/foo`: `invalid volume specification`,
diff --git a/volume/mounts/validate.go b/volume/mounts/validate.go
index 0b71526901..9fc9109021 100644
--- a/volume/mounts/validate.go
+++ b/volume/mounts/validate.go
@@ -17,7 +17,7 @@ func (e *errMountConfig) Error() string {
}
func errBindSourceDoesNotExist(path string) error {
- return errors.Errorf("bind mount source path does not exist: %s", path)
+ return errors.Errorf("bind source path does not exist: %s", path)
}
func errExtraField(name string) error {