DockerCLI/cli/command/image/testdata
Sebastiaan van Stijn 1e1dd5bca4
Fix panic when pruning images with label-filter
Before this change:

    docker image prune --force --filter "label=foobar"
    panic: assignment to entry in nil map

    goroutine 1 [running]:
    github.com/docker/cli/vendor/github.com/docker/docker/api/types/filters.Args.Add(...)
    /go/src/github.com/docker/cli/vendor/github.com/docker/docker/api/types/filters/parse.go:167
    github.com/docker/cli/cli/command/image.runPrune(0x1db3a20, 0xc000344cf0, 0x16e0001, 0xc00015e600, 0x4, 0x3, 0xc00024e160, 0xc000545c70, 0x5ab4b5)
    /go/src/github.com/docker/cli/cli/command/image/prune.go:79 +0xbaf
    github.com/docker/cli/cli/command/image.NewPruneCommand.func1(0xc00029ef00, 0xc0004a8180, 0x0, 0x3, 0x0, 0x0)
    /go/src/github.com/docker/cli/cli/command/image/prune.go:32 +0x64
    github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).execute(0xc00029ef00, 0xc000038210, 0x3, 0x3, 0xc00029ef00, 0xc000038210)
    /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:762 +0x473
    github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc000127180, 0xc000272770, 0x1836ce0, 0xc000272780)
    /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:852 +0x2fd
    github.com/docker/cli/vendor/github.com/spf13/cobra.(*Command).Execute(0xc000127180, 0xc000127180, 0x1d60880)
    /go/src/github.com/docker/cli/vendor/github.com/spf13/cobra/command.go:800 +0x2b
    main.main()
    /go/src/github.com/docker/cli/cmd/docker/docker.go:180 +0xdc

With this patch applied:

    docker image prune --force --filter "label=foobar"
    Total reclaimed space: 0B

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-12-07 17:56:31 +01:00
..
history-command-success.non-human.golden Update some assertions. 2018-03-05 17:15:24 -05:00
history-command-success.quiet-no-trunc.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
history-command-success.quiet.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
history-command-success.simple.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
import-command-success.input.txt Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
inspect-command-success.format.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
inspect-command-success.simple-many.golden update tests for new image struct 2017-07-04 20:34:24 -07:00
inspect-command-success.simple.golden update tests for new image struct 2017-07-04 20:34:24 -07:00
list-command-success.filters.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
list-command-success.format.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
list-command-success.match-name.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
list-command-success.quiet-format.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
list-command-success.simple.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.input-file.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.input.txt Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.json.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
load-command-success.simple.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.all.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.force-deleted.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.force-untagged.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
prune-command-success.label-filter.golden Fix panic when pruning images with label-filter 2018-12-07 17:56:31 +01:00
pull-command-success.simple-no-tag.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
pull-command-success.simple.golden Unit tests for cli/commands/image (except build and tag) 2017-05-03 18:40:22 -07:00
remove-command-success.Image Deleted and Untagged.golden Fix remove_test output duplication 2017-06-13 14:02:56 +02:00
remove-command-success.Image Deleted.golden Fix remove_test output duplication 2017-06-13 14:02:56 +02:00
remove-command-success.Image Untagged.golden Fix remove_test output duplication 2017-06-13 14:02:56 +02:00
remove-command-success.Image not found with force option.golden Use t.Run() for tests 2017-10-30 13:00:03 -04:00