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/255-auto-update.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/255-auto-update.bats')
-rw-r--r-- | test/system/255-auto-update.bats | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index 5a8bf4218..6cdae2ada 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -178,9 +178,8 @@ function _confirm_update() { is "$output" "$oldID" "container rolled back to previous image" run_podman container inspect --format "{{.ID}}" $cname - if [[ $output == $containerID ]]; then - die "container has not been restarted during rollback (previous id: $containerID, current id: $output)" - fi + assert "$output" != "$containerID" \ + "container has not been restarted during rollback" } @test "podman auto-update - label io.containers.autoupdate=disabled" { @@ -329,11 +328,9 @@ EOF for cname in "${cnames[@]}"; do run_podman inspect --format "{{.Image}}" $cname if [[ -n "${expect_update[$cname]}" ]]; then - if [[ "$output" == "$img_id" ]]; then - die "$cname: image ID ($output) did not change" - fi + assert "$output" != "$img_id" "$cname: image ID did not change" else - is "$output" "$img_id" "Image should not be changed." + assert "$output" = "$img_id" "Image ID should not be changed." fi done } |