1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

integration-cli: also run Docker Hub search tests on Windows

The API does not filter images on platform, so searching on
Windows should work as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-07-17 13:10:27 +02:00
parent 2ac55d5c9a
commit 3d1850d10d
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -10,8 +10,6 @@ import (
// search for repos named "registry" on the central registry // search for repos named "registry" on the central registry
func (s *DockerSuite) TestSearchOnCentralRegistry(c *check.C) { func (s *DockerSuite) TestSearchOnCentralRegistry(c *check.C) {
testRequires(c, Network, DaemonIsLinux)
out, _ := dockerCmd(c, "search", "busybox") out, _ := dockerCmd(c, "search", "busybox")
assert.Assert(c, strings.Contains(out, "Busybox base image."), "couldn't find any repository named (or containing) 'Busybox base image.'") assert.Assert(c, strings.Contains(out, "Busybox base image."), "couldn't find any repository named (or containing) 'Busybox base image.'")
} }
@ -35,8 +33,6 @@ func (s *DockerSuite) TestSearchStarsOptionWithWrongParameter(c *check.C) {
} }
func (s *DockerSuite) TestSearchCmdOptions(c *check.C) { func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
testRequires(c, Network, DaemonIsLinux)
outSearchCmd, _ := dockerCmd(c, "search", "busybox") outSearchCmd, _ := dockerCmd(c, "search", "busybox")
assert.Assert(c, strings.Count(outSearchCmd, "\n") > 3, outSearchCmd) assert.Assert(c, strings.Count(outSearchCmd, "\n") > 3, outSearchCmd)
@ -65,15 +61,11 @@ func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
// search for repos which start with "ubuntu-" on the central registry // search for repos which start with "ubuntu-" on the central registry
func (s *DockerSuite) TestSearchOnCentralRegistryWithDash(c *check.C) { func (s *DockerSuite) TestSearchOnCentralRegistryWithDash(c *check.C) {
testRequires(c, Network, DaemonIsLinux)
dockerCmd(c, "search", "ubuntu-") dockerCmd(c, "search", "ubuntu-")
} }
// test case for #23055 // test case for #23055
func (s *DockerSuite) TestSearchWithLimit(c *check.C) { func (s *DockerSuite) TestSearchWithLimit(c *check.C) {
testRequires(c, Network, DaemonIsLinux)
for _, limit := range []int{10, 50, 100} { for _, limit := range []int{10, 50, 100} {
out, _, err := dockerCmdWithError("search", fmt.Sprintf("--limit=%d", limit), "docker") out, _, err := dockerCmdWithError("search", fmt.Sprintf("--limit=%d", limit), "docker")
assert.NilError(c, err) assert.NilError(c, err)