Browse code

Add diff command with emtpy string testcase

Signed-off-by: Antonio Murdaca <runcom@linux.com>

Antonio Murdaca authored on 2015/07/08 17:44:48
Showing 1 changed files
... ...
@@ -108,3 +108,10 @@ func (s *DockerSuite) TestDiffEnsureOnlyKmsgAndPtmx(c *check.C) {
108 108
 		}
109 109
 	}
110 110
 }
111
+
112
+// https://github.com/docker/docker/pull/14381#discussion_r33859347
113
+func (s *DockerSuite) TestDiffEmptyArgClientError(c *check.C) {
114
+	out, _, err := runCommandWithOutput(exec.Command(dockerBinary, "diff", ""))
115
+	c.Assert(err, check.NotNil)
116
+	c.Assert(strings.TrimSpace(out), check.Equals, "Container name cannot be empty")
117
+}