diff --git a/tests/volume_prune.go b/tests/volume_prune.go index 4af38f6..6da9024 100644 --- a/tests/volume_prune.go +++ b/tests/volume_prune.go @@ -8,7 +8,6 @@ import ( "github.com/onsi/ginkgo/v2" "github.com/onsi/gomega/gbytes" - "github.com/runfinch/common-tests/command" "github.com/runfinch/common-tests/option" ) @@ -25,19 +24,19 @@ func VolumePrune(o *option.Option) { ginkgo.It("should not remove a volume if it is used by a container", func() { command.Run(o, "run", "-v", fmt.Sprintf("%s:/tmp", testVolumeName), "--name", testContainerName, defaultImage) - command.Run(o, "volume", "prune", "--force") + command.Run(o, "volume", "prune", "--force", "--all") volumeShouldExist(o, testVolumeName) }) ginkgo.It("should remove all unused volumes with inputting y in prompt confirmation", func() { command.Run(o, "volume", "create", testVolumeName) - command.New(o, "volume", "prune").WithStdin(gbytes.BufferWithBytes([]byte("y"))).Run() + command.New(o, "volume", "prune", "--all").WithStdin(gbytes.BufferWithBytes([]byte("y"))).Run() volumeShouldNotExist(o, testVolumeName) }) ginkgo.It("should not remove all unused volumes with inputting n in prompt confirmation", func() { command.Run(o, "volume", "create", testVolumeName) - command.New(o, "volume", "prune").WithStdin(gbytes.BufferWithBytes([]byte("n"))).Run() + command.New(o, "volume", "prune", "--all").WithStdin(gbytes.BufferWithBytes([]byte("n"))).Run() volumeShouldExist(o, testVolumeName) }) @@ -45,7 +44,7 @@ func VolumePrune(o *option.Option) { force := force ginkgo.It(fmt.Sprintf("should remove all unused volumes without prompting for confirmation with %s flag", force), func() { command.Run(o, "volume", "create", testVolumeName) - command.Run(o, "volume", "prune", force) + command.Run(o, "volume", "prune", force, "--all") volumeShouldNotExist(o, testVolumeName) }) }