Skip to content

Commit

Permalink
test: podman checkpoint/restore the latest container
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Jia <[email protected]>
  • Loading branch information
chuanchang committed Mar 22, 2023
1 parent 6b9f314 commit 9be4a52
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/system/520-checkpoint.bats
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,27 @@ function teardown() {
run_podman network rm $netname
}

# rhbz#2177611 : podman breaks checkpoint/restore
@test "podman checkpoint/restore the latest container" {
skip_if_remote "podman-remote does not support --latest option"
# checkpoint/restore -l must print the IDs
run_podman run -d $IMAGE top
ctrID="$output"
run_podman container checkpoint --latest
is "$output" "$ctrID"

run_podman container inspect \
--format '{{.State.Status}}:{{.State.Running}}:{{.State.Paused}}:{{.State.Checkpointed}}' $ctrID
is "$output" "exited:false:false:true" "State. Status:Running:Pause:Checkpointed"

run_podman container restore -l
is "$output" "$ctrID"

run_podman container inspect \
--format '{{.State.Status}}:{{.State.Running}}:{{.State.Paused}}:{{.State.Checkpointed}}' $ctrID
is "$output" "running:true:false:false" "State. Status:Running:Pause:Checkpointed"

run_podman rm -t 0 -f $ctrID
}

# vim: filetype=sh

0 comments on commit 9be4a52

Please sign in to comment.