Skip to content

Commit

Permalink
Merge pull request #17887 from chuanchang/test_coverage_for_bz2177611
Browse files Browse the repository at this point in the history
test: podman checkpoint/restore the latest container
  • Loading branch information
openshift-merge-robot authored Mar 22, 2023
2 parents 6b9f314 + 9be4a52 commit 1051456
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 1051456

Please sign in to comment.