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>
This commit is contained in:
Sebastiaan van Stijn 2019-07-17 12:34:20 +02:00
parent 1be7065e99
commit a78b9a3726
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -47,13 +47,8 @@ func (s *DockerSuite) TestSearchStarsOptionWithWrongParameter(c *check.C) {
func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
testRequires(c, Network, DaemonIsLinux)
out, _ := dockerCmd(c, "search", "--help")
assert.Assert(c, strings.Contains(out, "Usage:\tdocker search [OPTIONS] TERM"))
outSearchCmd, _ := dockerCmd(c, "search", "busybox")
assert.Assert(c, strings.Count(outSearchCmd, "\n") > 3, outSearchCmd)
outSearchCmdNotrunc, _ := dockerCmd(c, "search", "--no-trunc=true", "busybox")
assert.Assert(c, len(outSearchCmd) <= len(outSearchCmdNotrunc), "The no-trunc option can't take effect.")
outSearchCmdautomated, _ := dockerCmd(c, "search", "--filter", "is-automated=true", "busybox") //The busybox is a busybox base image, not an AUTOMATED image.
outSearchCmdautomatedSlice := strings.Split(outSearchCmdautomated, "\n")