Browse code

TestSearchCmdOptions: remove cli-only checks

Both `--help` and `--no-trunc` are implemented in the CLI. There's
no need to verify them here because the integration tests use a
fixed version of the CLI.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/07/17 19:34:20
Showing 1 changed files
... ...
@@ -47,13 +47,8 @@ func (s *DockerSuite) TestSearchStarsOptionWithWrongParameter(c *check.C) {
47 47
 func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
48 48
 	testRequires(c, Network, DaemonIsLinux)
49 49
 
50
-	out, _ := dockerCmd(c, "search", "--help")
51
-	assert.Assert(c, strings.Contains(out, "Usage:\tdocker search [OPTIONS] TERM"))
52
-
53 50
 	outSearchCmd, _ := dockerCmd(c, "search", "busybox")
54 51
 	assert.Assert(c, strings.Count(outSearchCmd, "\n") > 3, outSearchCmd)
55
-	outSearchCmdNotrunc, _ := dockerCmd(c, "search", "--no-trunc=true", "busybox")
56
-	assert.Assert(c, len(outSearchCmd) <= len(outSearchCmdNotrunc), "The no-trunc option can't take effect.")
57 52
 
58 53
 	outSearchCmdautomated, _ := dockerCmd(c, "search", "--filter", "is-automated=true", "busybox") //The busybox is a busybox base image, not an AUTOMATED image.
59 54
 	outSearchCmdautomatedSlice := strings.Split(outSearchCmdautomated, "\n")