Merge pull request #2107 from cgwalters/more-commit-clocking

admin-test: Show err.txt on unexpected failure
This commit is contained in:
OpenShift Merge Robot 2020-05-20 18:33:51 +02:00 committed by GitHub
commit 6586d240c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -306,8 +306,7 @@ prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buil
assert_not_streq ${head_rev} ${prev_rev}
# check that we can't "upgrade" to an older commit without --allow-downgrade
if ${CMD_PREFIX} ostree admin upgrade --os=testos --override-commit=${prev_rev} 2> err.txt; then
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo show "${prev_rev}"
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo show "${head_rev}"
cat err.txt
fatal "downgraded without --allow-downgrade?"
fi
assert_file_has_content err.txt "Upgrade.*is chronologically older"