Files
podman/test/e2e/volume_exists_test.go
Jan Kaluza a98154a978 Switch common, storage and image to monorepo.
Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2025-09-01 12:33:04 +02:00

33 lines
854 B
Go

//go:build linux || freebsd
package integration
import (
. "github.com/containers/podman/v5/test/utils"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"go.podman.io/storage/pkg/stringid"
)
var _ = Describe("Podman volume exists", func() {
AfterEach(func() {
podmanTest.CleanupVolume()
})
It("podman volume exists", func() {
vol := "vol" + stringid.GenerateRandomID()
session := podmanTest.Podman([]string{"volume", "create", vol})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
session = podmanTest.Podman([]string{"volume", "exists", vol})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitCleanly())
session = podmanTest.Podman([]string{"volume", "exists", stringid.GenerateRandomID()})
session.WaitWithDefaultTimeout()
Expect(session).Should(ExitWithError(1, ""))
})
})