summaryrefslogtreecommitdiff
path: root/integration-cli/docker_cli_search_test.go
diff options
context:
space:
mode:
authorHu Keping <hukeping@huawei.com>2015-09-22 19:44:40 +0800
committerHuKeping <hukeping@huawei.com>2015-10-04 23:23:43 +0800
commitf04e8fdb9bbcdad28de5c328b7de3f3abdae0b5a (patch)
treeee696d660533476b92fe8f5f6fcb0be30bf105b5 /integration-cli/docker_cli_search_test.go
parentebe7ef9fc2238f008101f31c0c405cbc460ab757 (diff)
downloaddocker-f04e8fdb9bbcdad28de5c328b7de3f3abdae0b5a.tar.gz
Fix docker search problem
Search terms shouldn't be restricted to only full valid repository names. It should be perfectly valid to search using a part of a name, even if it ends with a period, dash or underscore. Signed-off-by: Hu Keping <hukeping@huawei.com>
Diffstat (limited to 'integration-cli/docker_cli_search_test.go')
-rw-r--r--integration-cli/docker_cli_search_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/integration-cli/docker_cli_search_test.go b/integration-cli/docker_cli_search_test.go
index 3707b883c9..44f9b2c76a 100644
--- a/integration-cli/docker_cli_search_test.go
+++ b/integration-cli/docker_cli_search_test.go
@@ -89,3 +89,11 @@ func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
c.Fatalf("failed to search with stars&automated&no-trunc options on the central registry: %s", out)
}
}
+
+// search for repos which start with "ubuntu-" on the central registry
+func (s *DockerSuite) TestSearchOnCentralRegistryWithDash(c *check.C) {
+ testRequires(c, Network, DaemonIsLinux)
+
+ out, exitCode := dockerCmd(c, "search", "ubuntu-")
+ c.Assert(exitCode, check.Equals, 0, check.Commentf("failed to search on the central registry: %s", out))
+}