mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Verify the no-trunc option for the search operation.
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
This commit is contained in:
parent
77183ed760
commit
6e8aa4e588
1 changed files with 10 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue