summaryrefslogtreecommitdiff
path: root/tests/test-repo.sh
diff options
context:
space:
mode:
authorPatrick <pgriffis@igalia.com>2023-01-07 18:48:28 -0600
committerGitHub <noreply@github.com>2023-01-07 18:48:28 -0600
commite110bf7c7fc28ede5bde59a8a28cfe8b163595e4 (patch)
tree63283a96075325e86b37c3d57a7aaa1c9d2eb4e0 /tests/test-repo.sh
parentb61a6d836c30d446c707f50585f7a91a8ae1857d (diff)
parent523cedc27509779e7e815806e53361d5fe7e0bd4 (diff)
downloadflatpak-appstreamcli-compose.tar.gz
Merge branch 'main' into appstreamcli-composeappstreamcli-compose
Diffstat (limited to 'tests/test-repo.sh')
-rw-r--r--tests/test-repo.sh18
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