test: Add a simple test for listing target versions in sysupdate
I’m about to refactor it slightly and it would be nice to have a little test coverage to check against. (cherry picked from commit 8433ed1c7a66ee575621cde027a890017769252c)
This commit is contained in:
committed by
Luca Boccassi
parent
399c086887
commit
0450557040
@@ -692,6 +692,10 @@ EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check that the target versions are listed correctly.
|
||||
[[ $( "$SYSUPDATE" --verify=no --json=short list | jq -cr '.all') == '["v9","v8","v7","v6","v5","v3","v2","v1"]' ]]
|
||||
[[ $( "$SYSUPDATE" --verify=no --offline --json=short list | jq -cr '.all') == '["v9","v8","v7","v6"]' ]]
|
||||
|
||||
# Cleanup
|
||||
[[ -b "$blockdev" ]] && losetup --detach "$blockdev"
|
||||
rm "$BACKING_FILE"
|
||||
|
||||
Reference in New Issue
Block a user