don't restrict filters in docker images
Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
parent
95c0f07966
commit
0e9acf7684
|
|
@ -49,10 +49,6 @@ const (
|
||||||
tarHeaderSize = 512
|
tarHeaderSize = 512
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
acceptedImageFilterTags = map[string]struct{}{"dangling": {}}
|
|
||||||
)
|
|
||||||
|
|
||||||
func (cli *DockerCli) CmdHelp(args ...string) error {
|
func (cli *DockerCli) CmdHelp(args ...string) error {
|
||||||
if len(args) > 1 {
|
if len(args) > 1 {
|
||||||
method, exists := cli.getMethod(args[:2]...)
|
method, exists := cli.getMethod(args[:2]...)
|
||||||
|
|
@ -1331,12 +1327,6 @@ func (cli *DockerCli) CmdImages(args ...string) error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for name := range imageFilterArgs {
|
|
||||||
if _, ok := acceptedImageFilterTags[name]; !ok {
|
|
||||||
return fmt.Errorf("Invalid filter '%s'", name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
matchName := cmd.Arg(0)
|
matchName := cmd.Arg(0)
|
||||||
// FIXME: --viz and --tree are deprecated. Remove them in a future version.
|
// FIXME: --viz and --tree are deprecated. Remove them in a future version.
|
||||||
if *flViz || *flTree {
|
if *flViz || *flTree {
|
||||||
|
|
|
||||||
|
|
@ -67,16 +67,6 @@ func TestImagesOrderedByCreationDate(t *testing.T) {
|
||||||
logDone("images - ordering by creation date")
|
logDone("images - ordering by creation date")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestImagesErrorWithInvalidFilterNameTest(t *testing.T) {
|
|
||||||
imagesCmd := exec.Command(dockerBinary, "images", "-f", "FOO=123")
|
|
||||||
out, _, err := runCommandWithOutput(imagesCmd)
|
|
||||||
if !strings.Contains(out, "Invalid filter") {
|
|
||||||
t.Fatalf("error should occur when listing images with invalid filter name FOO, %s, %v", out, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
logDone("images - invalid filter name check working")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestImagesFilterWhiteSpaceTrimmingAndLowerCasingWorking(t *testing.T) {
|
func TestImagesFilterWhiteSpaceTrimmingAndLowerCasingWorking(t *testing.T) {
|
||||||
imageName := "images_filter_test"
|
imageName := "images_filter_test"
|
||||||
defer deleteAllContainers()
|
defer deleteAllContainers()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue