diff --git a/tests/volume_create.go b/tests/volume_create.go index a2bb1fa..a538a35 100644 --- a/tests/volume_create.go +++ b/tests/volume_create.go @@ -64,9 +64,11 @@ func VolumeCreate(o *option.Option) { gomega.Expect(tag1).Should(gomega.Equal("tag1")) }) - ginkgo.It("should not create a volume if the volume with the same name exists", func() { + ginkgo.It("should warn volume already exists if a volume with the same name exists", func() { command.Run(o, "volume", "create", testVolumeName) - command.RunWithoutSuccessfulExit(o, "volume", "create", testVolumeName) + session := command.Run(o, "volume", "create", testVolumeName) + gomega.Expect(string(session.Err.Contents())).Should(gomega.ContainSubstring("already exists")) + gomega.Expect(string(session.Out.Contents())).Should(gomega.ContainSubstring(testVolumeName)) }) }) }