Merge pull request #2087 from cgwalters/test-staged-deploy-cleanup

tests/staged-deploy: Cleanup initial state
This commit is contained in:
OpenShift Merge Robot 2020-05-01 22:10:53 +02:00 committed by GitHub
commit e6bc24804c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,6 +9,10 @@ prepare_tmpdir
n=$(nth_boot) n=$(nth_boot)
case "${n}" in case "${n}" in
1) 1)
# Initial cleanup to handle the cosa fast-build case
## TODO remove workaround for https://github.com/coreos/rpm-ostree/pull/2021
mkdir -p /var/lib/rpm-ostree/history
rpm-ostree cleanup -pr
commit=${host_commit} commit=${host_commit}
# Test the deploy --stage functionality; first, we stage a deployment # Test the deploy --stage functionality; first, we stage a deployment
# reboot, and validate that it worked. # reboot, and validate that it worked.
@ -71,8 +75,6 @@ case "${n}" in
firstdeploycommit=$(rpm-ostree status |grep 'Commit:' |head -1|sed -e 's,^ *Commit: *,,') firstdeploycommit=$(rpm-ostree status |grep 'Commit:' |head -1|sed -e 's,^ *Commit: *,,')
assert_streq "${firstdeploycommit}" "${newcommit}" assert_streq "${firstdeploycommit}" "${newcommit}"
# Cleanup # Cleanup
## TODO remove workaround for https://github.com/coreos/rpm-ostree/pull/2021
mkdir -p /var/lib/rpm-ostree/history
rpm-ostree cleanup -rp rpm-ostree cleanup -rp
echo "ok upgrade with staging" echo "ok upgrade with staging"