mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-11 08:27:36 +00:00
Rework podman run checkpoint test
Needs to properly handle the error now that we've removed the functionality. Signed-off-by: Matt Heon <matthew.heon@pm.me>
This commit is contained in:
parent
c74b1d37b3
commit
fa6cef22c2
1 changed files with 2 additions and 14 deletions
|
|
@ -275,7 +275,7 @@ var _ = Describe("Podman checkpoint", func() {
|
|||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
|
||||
})
|
||||
|
||||
It("podman run with checkpoint image", func() {
|
||||
It("podman run with checkpoint image throws an error", func() {
|
||||
// Container image must be lowercase
|
||||
checkpointImage := "alpine-checkpoint-" + strings.ToLower(RandomString(6))
|
||||
containerName := "alpine-container-" + RandomString(6)
|
||||
|
|
@ -301,19 +301,7 @@ var _ = Describe("Podman checkpoint", func() {
|
|||
// Restore containers from image using `podman run`
|
||||
result = podmanTest.Podman([]string{"run", checkpointImage})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result).Should(ExitCleanly())
|
||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(1))
|
||||
|
||||
// Check if the container is running
|
||||
status := podmanTest.Podman([]string{"inspect", containerName, "--format={{.State.Status}}"})
|
||||
status.WaitWithDefaultTimeout()
|
||||
Expect(status).Should(ExitCleanly())
|
||||
Expect(status.OutputToString()).To(Equal("running"))
|
||||
|
||||
// Clean-up
|
||||
result = podmanTest.Podman([]string{"rm", "-t", "0", "-fa"})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result).Should(ExitCleanly())
|
||||
Expect(result).Should(ExitWithError(125, "is a checkpoint and must be started using `podman container restore` instead"))
|
||||
Expect(podmanTest.NumberOfContainersRunning()).To(Equal(0))
|
||||
|
||||
result = podmanTest.Podman([]string{"rmi", checkpointImage})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue