Merge pull request #12952 from sunyuan3/trunc

Verify the no-trunc option for the search operation
This commit is contained in:
Jessie Frazelle 2015-05-07 16:52:46 -07:00
Родитель 372977148d 6e8aa4e588
Коммит 0ed2013590
1 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -63,6 +63,16 @@ func (s *DockerSuite) TestSearchCmdOptions(c *check.C) {
c.Fatalf("failed to search on the central registry: %s, %v", outSearchCmd, err)
}
searchCmdNotrunc := exec.Command(dockerBinary, "search", "--no-trunc=true", "busybox")
outSearchCmdNotrunc, _, err := runCommandWithOutput(searchCmdNotrunc)
if err != nil {
c.Fatalf("failed to search on the central registry: %s, %v", outSearchCmdNotrunc, err)
}
if len(outSearchCmd) > len(outSearchCmdNotrunc) {
c.Fatalf("The no-trunc option can't take effect.")
}
searchCmdautomated := exec.Command(dockerBinary, "search", "--automated=true", "busybox")
outSearchCmdautomated, exitCode, err := runCommandWithOutput(searchCmdautomated) //The busybox is a busybox base image, not an AUTOMATED image.
if err != nil || exitCode != 0 {