summaryrefslogtreecommitdiff
path: root/tests/kolainst
diff options
context:
space:
mode:
authorJonathan Lebon <jonathan@jlebon.com>2022-08-15 17:50:11 -0400
committerJonathan Lebon <jonathan@jlebon.com>2022-08-15 17:50:11 -0400
commit84670a007061196249cde89e31b36b5b37478e61 (patch)
tree1f2d058d81d7edfe5f2ebf38aa7e451f01383ecd /tests/kolainst
parent93e47f88f486e5df1030066d0120b0db034ca6c8 (diff)
downloadostree-84670a007061196249cde89e31b36b5b37478e61.tar.gz
tests/kolainst/staged-deploy: parse `rpm-ostree status --json` instead
Don't parse `rpm-ostree status` output, it's not meant for that. Use `--json` output instead. While we're here, fix an obsolete reference to Ansible. Related: https://github.com/coreos/rpm-ostree/pull/3938
Diffstat (limited to 'tests/kolainst')
-rwxr-xr-xtests/kolainst/destructive/staged-deploy.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/kolainst/destructive/staged-deploy.sh b/tests/kolainst/destructive/staged-deploy.sh
index af31078a..c923605f 100755
--- a/tests/kolainst/destructive/staged-deploy.sh
+++ b/tests/kolainst/destructive/staged-deploy.sh
@@ -100,8 +100,7 @@ EOF
newcommit=$(ostree rev-parse staged-deploy)
ostree admin upgrade --stage >out.txt
test -f /run/ostree/staged-deployment
- # Debating bouncing back out to Ansible for this
- firstdeploycommit=$(rpm-ostree status |grep 'Commit:' |head -1|sed -e 's,^ *Commit: *,,')
+ firstdeploycommit=$(rpm-ostree status --json | jq -r .deployments[0].checksum)
assert_streq "${firstdeploycommit}" "${newcommit}"
# Cleanup
rpm-ostree cleanup -rp