diff options
Diffstat (limited to 'tests/test-repo.sh')
-rw-r--r-- | tests/test-repo.sh | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/test-repo.sh b/tests/test-repo.sh index 926072ab..55403259 100644 --- a/tests/test-repo.sh +++ b/tests/test-repo.sh @@ -24,7 +24,7 @@ set -euo pipefail skip_without_bwrap skip_revokefs_without_fuse -echo "1..44" +echo "1..45" #Regular repo setup_repo @@ -192,7 +192,7 @@ port=$(cat httpd-port) if ${FLATPAK} ${U} install -y http://127.0.0.1:${port}/nonexistent.flatpakref &> install-error-log; then assert_not_reached "Should not be able to install a nonexistent flatpakref" fi -assert_file_has_content install-error-log "Server returned status 404: Not Found" +assert_file_has_content install-error-log "Server returned status 404" ok "install fails gracefully for 404 URLs" @@ -208,7 +208,7 @@ GPGKey=${FL_GPG_BASE64} EOF if [ x${USE_COLLECTIONS_IN_CLIENT-} == xyes ]; then - echo "DeployCollectionID=org.test.Collection.Flatpakref" >> repos/flatpakref/flatpakref-repo.flatpakrepo + echo "DeploySideloadCollectionID=org.test.Collection.Flatpakref" >> repos/flatpakref/flatpakref-repo.flatpakrepo fi cat << EOF > org.test.Hello.flatpakref @@ -221,6 +221,10 @@ GPGKey=${FL_GPG_BASE64} RuntimeRepo=http://127.0.0.1:$(cat httpd-port)/flatpakref/flatpakref-repo.flatpakrepo EOF +if [ x${USE_COLLECTIONS_IN_CLIENT-} == xyes ]; then + echo "DeploySideloadCollectionID=org.test.Collection.Flatpakref" >> org.test.Hello.flatpakref +fi + ${FLATPAK} ${U} uninstall -y org.test.Platform org.test.Hello >&2 # Ensure that only one remote is added even though the URL in the flatpakref @@ -239,6 +243,14 @@ assert_remote_has_config allthegoodstuff xa.title "The Remote Title" ok "install flatpakref uses RuntimeRepo metadata for remote" +if [ x${USE_COLLECTIONS_IN_CLIENT-} == xyes ]; then + assert_remote_has_config allthegoodstuff collection-id "org.test.Collection.Flatpakref" +else + assert_remote_has_no_config allthegoodstuff collection-id +fi + +ok "install flatpakref sets collection-id on remote if available" + ${FLATPAK} ${U} uninstall -y org.test.Platform org.test.Hello >&2 if ${FLATPAK} ${U} install -y test-missing-gpg-repo org.test.Platform &> install-error-log; then |