From: Colin Walters Date: Wed, 29 Apr 2020 01:45:48 +0000 (+0000) Subject: tests/staged-deploy: Cleanup initial state X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~10^2~49^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=37e1921b51a970b8b8bfbb0756ad83d8a9836f45;p=ostree.git tests/staged-deploy: Cleanup initial state I'm using [cosa build-fast](https://github.com/coreos/coreos-assembler/pull/1371) and this test doesn't like starting out with two deployments. Clean things up to one at the start just to simplify things. --- diff --git a/tests/kola/destructive/staged-deploy.sh b/tests/kola/destructive/staged-deploy.sh index e0c17a27..cc3e7a7e 100755 --- a/tests/kola/destructive/staged-deploy.sh +++ b/tests/kola/destructive/staged-deploy.sh @@ -9,6 +9,10 @@ prepare_tmpdir n=$(nth_boot) case "${n}" in 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} # Test the deploy --stage functionality; first, we stage a deployment # 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: *,,') assert_streq "${firstdeploycommit}" "${newcommit}" # Cleanup - ## TODO remove workaround for https://github.com/coreos/rpm-ostree/pull/2021 - mkdir -p /var/lib/rpm-ostree/history rpm-ostree cleanup -rp echo "ok upgrade with staging"