diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-05-17 10:32:29 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-17 10:32:29 +0200 |
commit | c432c417c241abc2f6ec45f3e504a37ec913f36a (patch) | |
tree | 71ec39fa33b463cd2191d16e5813bbb03fee44e7 /tests/test-run.sh | |
parent | 3b291090c78896b9892b0f38afa9e00d2602c6c3 (diff) | |
download | flatpak-c432c417c241abc2f6ec45f3e504a37ec913f36a.tar.gz |
tests: Add test for update
Diffstat (limited to 'tests/test-run.sh')
-rwxr-xr-x | tests/test-run.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/test-run.sh b/tests/test-run.sh index c10912a4..6a62dd75 100755 --- a/tests/test-run.sh +++ b/tests/test-run.sh @@ -21,7 +21,7 @@ set -euo pipefail . $(dirname $0)/libtest.sh -echo "1..5" +echo "1..6" setup_repo install_repo @@ -101,3 +101,23 @@ if run_sh cat $(dirname $0)/package_version.txt &> /dev/null; then fi echo "ok overrides" + + +OLD_COMMIT=`${FLATPAK} --user info --show-commit org.test.Hello` +${FLATPAK} --user update org.test.Hello +ALSO_OLD_COMMIT=`${FLATPAK} --user info --show-commit org.test.Hello` + +assert_streq "$OLD_COMMIT" "$ALSO_OLD_COMMIT" + +make_updated_app + +${FLATPAK} --user update org.test.Hello + +NEW_COMMIT=`${FLATPAK} --user info --show-commit org.test.Hello` + +assert_not_streq "$OLD_COMMIT" "$NEW_COMMIT" + +run org.test.Hello > hello_out +assert_file_has_content hello_out '^Hello world, from a sandboxUPDATED$' + +echo "ok update" |