Skip to content

Commit

Permalink
feat: create volume command should be idempotent (#199)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez authored Dec 29, 2024
1 parent a72356f commit 0cd8a88
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/volume_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
})
}

0 comments on commit 0cd8a88

Please sign in to comment.