tests: Test stuff with the old (non-indexed) summary format too

This commit is contained in:
Alexander Larsson
2020-10-21 14:05:25 +02:00
committed by Alexander Larsson
parent 0d2cf085af
commit 12fd8332da
5 changed files with 25 additions and 6 deletions

View File

@@ -11,6 +11,8 @@ TEST_MATRIX= \
tests/test-repo@user.wrap \
tests/test-repo@system.wrap \
tests/test-repo@system-norevokefs.wrap \
tests/test-repo@user,oldsummary.wrap \
tests/test-repo@system,oldsummary.wrap \
tests/test-sideload@user.wrap \
tests/test-sideload@system.wrap \
tests/test-bundle@user.wrap \
@@ -18,6 +20,8 @@ TEST_MATRIX= \
tests/test-bundle@system-norevokefs.wrap \
tests/test-oci-registry@user.wrap \
tests/test-oci-registry@system.wrap \
tests/test-update-remote-configuration@newsummary.wrap \
tests/test-update-remote-configuration@oldsummary.wrap \
tests/test-update-portal@user.wrap \
tests/test-update-portal@system.wrap \
$(NULL)
@@ -30,7 +34,6 @@ TEST_MATRIX_DIST= \
tests/test-default-remotes.sh \
tests/test-extensions.sh \
tests/test-oci.sh \
tests/test-update-remote-configuration.sh \
tests/test-override.sh \
tests/test-auth.sh \
tests/test-unused.sh \
@@ -42,5 +45,6 @@ TEST_MATRIX_EXTRA_DIST= \
tests/test-sideload.sh \
tests/test-bundle.sh \
tests/test-oci-registry.sh \
tests/test-update-remote-configuration.sh \
tests/test-update-portal.sh \
$(NULL)

View File

@@ -192,14 +192,14 @@ TEST_MATRIX_SOURCE = \
tests/test-http-utils.sh \
tests/test-run.sh{{user+system+system-norevokefs},{nodeltas+deltas}} \
tests/test-info.sh{user+system} \
tests/test-repo.sh{user+system+system-norevokefs} \
tests/test-repo.sh{{user+system+system-norevokefs}+{{user+system},oldsummary}} \
tests/test-sideload.sh{user+system} \
tests/test-default-remotes.sh \
tests/test-extensions.sh \
tests/test-bundle.sh{user+system+system-norevokefs} \
tests/test-oci.sh \
tests/test-oci-registry.sh{user+system} \
tests/test-update-remote-configuration.sh \
tests/test-update-remote-configuration.sh{newsummary+oldsummary} \
tests/test-override.sh \
tests/test-update-portal.sh{user+system} \
tests/test-auth.sh \

View File

@@ -109,6 +109,10 @@ export USERDIR=${TEST_DATA_DIR}/home/share/flatpak
export SYSTEMDIR=${TEST_DATA_DIR}/system
export ARCH=`flatpak --default-arch`
if [ x${SUMMARY_FORMAT-} == xold ] ; then
export BUILD_UPDATE_REPO_FLAGS="--no-summary-index"
fi
if [ x${USE_SYSTEMDIR-} == xyes ] ; then
export FL_DIR=${SYSTEMDIR}
export U=
@@ -394,7 +398,12 @@ update_repo () {
collection_args=
fi
${FLATPAK} build-update-repo ${collection_args} ${GPGARGS:-${FL_GPGARGS}} ${UPDATE_REPO_ARGS-} repos/${REPONAME}
${FLATPAK} build-update-repo ${BUILD_UPDATE_REPO_FLAGS-} ${collection_args} ${GPGARGS:-${FL_GPGARGS}} ${UPDATE_REPO_ARGS-} repos/${REPONAME}
if [ x${SUMMARY_FORMAT-} == xold ] ; then
assert_not_has_file repos/${REPONAME}/summary.idx
else
assert_has_file repos/${REPONAME}/summary.idx
fi
}
make_updated_app () {

View File

@@ -77,7 +77,7 @@ fi
# Remove new appstream branch so we can test deploying the old one
rm -rf repos/test/refs/heads/appstream2
${FLATPAK} build-update-repo --no-update-appstream ${FL_GPGARGS} repos/test
${FLATPAK} build-update-repo ${BUILD_UPDATE_REPO_FLAGS-} --no-update-appstream ${FL_GPGARGS} repos/test
flatpak ${U} --appstream update test-repo
@@ -720,7 +720,7 @@ fi
ok "remote-ls"
# Test that remote-ls can take a file:// URI
${FLATPAK} build-update-repo --no-update-appstream repos/test
${FLATPAK} build-update-repo ${BUILD_UPDATE_REPO_FLAGS-} --no-update-appstream repos/test
${FLATPAK} remote-ls file://`pwd`/repos/test > repo-list
assert_file_has_content repo-list "org\.test\.Hello"

View File

@@ -15,6 +15,12 @@ for feature in $(echo $1 | sed "s/^.*@\(.*\).wrap/\1/" | tr "," "\n"); do
deltas)
export USE_DELTAS=yes
;;
newsummary)
export SUMMARY_FORMAT=new
;;
oldsummary)
export SUMMARY_FORMAT=old
;;
nodeltas)
export USE_DELTAS=no
;;