Browse code

TestSearchCmdOptions: remove checks for deprecated flags

The `--stars` and `--automated` flags have been deprecated, and were
replaced by `--filter stars=xx` and `--filter is-automated=true`.

Integration tests run with a fixed version of the CLI, and the new
(`--filter`) option is already tested in this test, so there's no need
to verify the old flags.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b38c71bfe06ddb663aa4919ff9c496c395311985)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>

Sebastiaan van Stijn authored on 2019/07/17 19:47:57
Showing 1 changed files
... ...
@@ -71,20 +71,6 @@ func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
71 71
 	assert.Assert(c, strings.Count(outSearchCmdStars, "\n") <= strings.Count(outSearchCmd, "\n"), "Number of images with 10+ stars should be less than that of all images:\noutSearchCmdStars: %s\noutSearch: %s\n", outSearchCmdStars, outSearchCmd)
72 72
 
73 73
 	dockerCmd(c, "search", "--filter", "is-automated=true", "--filter", "stars=2", "--no-trunc=true", "busybox")
74
-
75
-	// --automated deprecated since Docker 1.13
76
-	outSearchCmdautomated1, _ := dockerCmd(c, "search", "--automated=true", "busybox") //The busybox is a busybox base image, not an AUTOMATED image.
77
-	outSearchCmdautomatedSlice1 := strings.Split(outSearchCmdautomated1, "\n")
78
-	for i := range outSearchCmdautomatedSlice1 {
79
-		assert.Assert(c, !strings.HasPrefix(outSearchCmdautomatedSlice1[i], "busybox "), "The busybox is not an AUTOMATED image: %s", outSearchCmdautomated)
80
-	}
81
-
82
-	// -s --stars deprecated since Docker 1.13
83
-	outSearchCmdStars1, _ := dockerCmd(c, "search", "--stars=2", "busybox")
84
-	assert.Assert(c, strings.Count(outSearchCmdStars1, "[OK]") <= strings.Count(outSearchCmd, "[OK]"), "The quantity of images with stars should be less than that of all images: %s", outSearchCmdStars1)
85
-
86
-	// -s --stars deprecated since Docker 1.13
87
-	dockerCmd(c, "search", "--stars=2", "--automated=true", "--no-trunc=true", "busybox")
88 74
 }
89 75
 
90 76
 // search for repos which start with "ubuntu-" on the central registry