Remove defaults for flags/options that expect no value

- isZeroValue function from upstream go
 - covers booleans, strings and numbers
 - change integration to reflect new behavior
 - resolves #9406

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 48718a3c772681b4a3644ba304d37fb9382e6f73
Component: engine
This commit is contained in:
Morgan Bauer
2015-11-18 18:27:59 -08:00
parent 1ec73033b7
commit f51688acff
2 changed files with 22 additions and 3 deletions

View File

@ -126,7 +126,7 @@ func (s *DockerSuite) TestHelpTextVerify(c *check.C) {
out, stderr, _, err = runCommandWithStdoutStderr(helpCmd)
c.Assert(len(stderr), checker.Equals, 0, check.Commentf("Error on %q help. non-empty stderr:%q", cmd, stderr))
c.Assert(out, checker.Not(checker.HasSuffix), "\n\n", check.Commentf("Should not have blank line on %q\n", cmd))
c.Assert(out, checker.Contains, "--help=false", check.Commentf("Should show full usage on %q\n", cmd))
c.Assert(out, checker.Contains, "--help", check.Commentf("All commands should mention '--help'. Command '%v' did not.\n", cmd))
c.Assert(err, checker.IsNil, check.Commentf(out))