don't restrict filters in docker images
Signed-off-by: Victor Vieux <vieux@docker.com> Upstream-commit: 0e9acf76844a0dcd76bc855b945d0e4b80149195 Component: engine
This commit is contained in:
@@ -49,10 +49,6 @@ const (
|
||||
tarHeaderSize = 512
|
||||
)
|
||||
|
||||
var (
|
||||
acceptedImageFilterTags = map[string]struct{}{"dangling": {}}
|
||||
)
|
||||
|
||||
func (cli *DockerCli) CmdHelp(args ...string) error {
|
||||
if len(args) > 1 {
|
||||
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)
|
||||
// FIXME: --viz and --tree are deprecated. Remove them in a future version.
|
||||
if *flViz || *flTree {
|
||||
|
||||
@@ -67,16 +67,6 @@ func TestImagesOrderedByCreationDate(t *testing.T) {
|
||||
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) {
|
||||
imageName := "images_filter_test"
|
||||
defer deleteAllContainers()
|
||||
|
||||
Reference in New Issue
Block a user