diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-04-22 06:30:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 06:30:49 -0400 |
commit | 82393e256593b9c78e64d2fecf47813b6c6f1b2c (patch) | |
tree | 01b9b47e9d7f55d9f7adb06ae12732a420f3682e /test/system/520-checkpoint.bats | |
parent | 26a51b29009e6250f2b52fc7c13fb1b65208754e (diff) | |
parent | 97ee4114655a9442a34130632c47eea5861ca73b (diff) | |
download | podman-82393e256593b9c78e64d2fecf47813b6c6f1b2c.tar.gz podman-82393e256593b9c78e64d2fecf47813b6c6f1b2c.tar.bz2 podman-82393e256593b9c78e64d2fecf47813b6c6f1b2c.zip |
Merge pull request #13935 from edsantiago/bats_assert
system tests: add assert(), and start using it
Diffstat (limited to 'test/system/520-checkpoint.bats')
-rw-r--r-- | test/system/520-checkpoint.bats | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/system/520-checkpoint.bats b/test/system/520-checkpoint.bats index b41d460a4..c16a8c35d 100644 --- a/test/system/520-checkpoint.bats +++ b/test/system/520-checkpoint.bats @@ -80,9 +80,8 @@ function teardown() { # Get full logs, and make sure something changed run_podman logs $cid local nlines_after="${#lines[*]}" - if [[ $nlines_after -eq $nlines_before ]]; then - die "Container failed to output new lines after first restore" - fi + assert $nlines_after -gt $nlines_before \ + "Container failed to output new lines after first restore" # Same thing again: test for https://github.com/containers/crun/issues/756 # in which, after second checkpoint/restore, we lose logs @@ -96,9 +95,8 @@ function teardown() { sleep 0.3 run_podman container logs $cid nlines_after="${#lines[*]}" - if [[ $nlines_after -eq $nlines_before ]]; then - die "stdout went away after second restore (crun issue 756)" - fi + assert $nlines_after -gt $nlines_before \ + "stdout went away after second restore (crun issue 756)" run_podman rm -t 0 -f $cid } @@ -160,9 +158,8 @@ function teardown() { sleep .3 run curl --max-time 3 -s $server/mydate local date_newroot="$output" - if [[ $date_newroot = $date_oldroot ]]; then - die "Restored container did not update the timestamp file" - fi + assert "$date_newroot" != "$date_oldroot" \ + "Restored container did not update the timestamp file" run_podman exec $cid cat /myvol/cname is "$output" "$cname" "volume transferred fine" |