summaryrefslogtreecommitdiff
path: root/tests/test-repo.sh
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2019-09-18 16:21:55 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2019-09-18 14:55:38 +0000
commit5026f01153c21a2906f7c7b7b573543691daccfd (patch)
treee66ec64158f94ba8815841c90b513047139bd9f5 /tests/test-repo.sh
parent62117308c1dd0f10f82d274d542da0d9b7f7d426 (diff)
downloadflatpak-5026f01153c21a2906f7c7b7b573543691daccfd.tar.gz
Support multiple versions in required-flatpak metadata key
Support a list of versions that are supported. This will be useful for e.g. the extra_data for extensions once that is backported to 1.2, because that will require it to say that it is supported for > 1.2.5 in the 1.2 series and > 1.4.2 otherwise. Closes: #3112 Approved by: alexlarsson
Diffstat (limited to 'tests/test-repo.sh')
-rw-r--r--tests/test-repo.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test-repo.sh b/tests/test-repo.sh
index 0792aa97..bf194d99 100644
--- a/tests/test-repo.sh
+++ b/tests/test-repo.sh
@@ -265,6 +265,8 @@ make_required_version_app org.test.NeedNewerMaster "$(expr ${V[0]} + 1).${V[1]}.
make_required_version_app org.test.NeedOlderMinor "${V[0]}.$(expr ${V[1]} - 1).${V[2]}"
make_required_version_app org.test.MultiVersionFallback "${V[0]}.${V[1]}.${V[2]};1.0.0;"
make_required_version_app org.test.MultiVersionFallbackFail "${V[0]}.$(expr ${V[1]} + 1).${V[2]};1.0.0;"
+make_required_version_app org.test.MultiVersionOk "${V[0]}.$(expr ${V[1]} + 1).0;${V[0]}.${V[1]}.${V[2]};"
+make_required_version_app org.test.MultiVersionNotOk "${V[0]}.$(expr ${V[1]} + 1).0;${V[0]}.${V[1]}.$(expr ${V[2]} + 1);"
update_repo $REPONAME "${COLLECTION_ID}"
@@ -293,6 +295,13 @@ if ${FLATPAK} ${U} install -y test-repo org.test.MultiVersionFallbackFail 2> ins
fi
assert_file_has_content install-error-log "needs a later flatpak version"
+${FLATPAK} ${U} install -y test-repo org.test.MultiVersionOk
+
+if ${FLATPAK} ${U} install -y test-repo org.test.MultiVersionNotOk 2> install-error-log; then
+ assert_not_reached "Should not be able to install with wrong multi version"
+fi
+assert_file_has_content install-error-log "needs a later flatpak version"
+
${FLATPAK} ${U} uninstall -y --all
echo "ok handles version requirements"