mirror of
https://github.com/flatpak/flatpak.git
synced 2026-01-31 02:51:22 -05:00
On some systems we can't make use of FUSE, especially on the same locked-down systems where distribution packages are typically built. For example, official Debian autobuilders (buildds) are configured to disallow module loading after boot has finished as a form of security hardening, some build chroots don't have a valid /etc/mtab, and Docker containers give us uid 0 but not CAP_SYS_ADMIN. These checks are taken from libostree. Signed-off-by: Simon McVittie <smcv@collabora.com> Closes: #2824 Approved by: matthiasclasen
57 lines
1.3 KiB
Bash
57 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
. $(dirname $0)/libtest.sh
|
|
|
|
skip_revokefs_without_fuse
|
|
|
|
echo "1..7"
|
|
|
|
setup_repo
|
|
install_repo
|
|
|
|
COMMIT=`${FLATPAK} ${U} info --show-commit org.test.Hello`
|
|
|
|
${FLATPAK} info -rcos org.test.Hello > info
|
|
|
|
assert_file_has_content info "^app/org\.test\.Hello/$(flatpak --default-arch)/master test-repo ${COMMIT}"
|
|
|
|
echo "ok info -rcos"
|
|
|
|
${FLATPAK} info --show-permissions org.test.Hello > info
|
|
|
|
assert_file_empty info
|
|
|
|
echo "ok info --show-permissions"
|
|
|
|
${FLATPAK} info --show-location org.test.Hello > info
|
|
|
|
assert_file_has_content info "app/org\.test\.Hello/$(flatpak --default-arch)/master/${COMMIT}"
|
|
|
|
echo "ok info --show-location"
|
|
|
|
${FLATPAK} info --show-runtime org.test.Hello > info
|
|
|
|
assert_file_has_content info "^org\.test\.Platform/$(flatpak --default-arch)/master$"
|
|
|
|
echo "ok info --show-runtime"
|
|
|
|
${FLATPAK} info --show-sdk org.test.Hello > info
|
|
|
|
assert_file_has_content info "^org\.test\.Platform/$(flatpak --default-arch)/master$"
|
|
|
|
echo "ok info --show-sdk"
|
|
|
|
${FLATPAK} info --show-extensions org.test.Hello > info
|
|
|
|
assert_file_has_content info "Extension: runtime/org\.test\.Hello\.Locale/$(flatpak --default-arch)/master$"
|
|
|
|
echo "ok info --show-extensions"
|
|
|
|
${FLATPAK} info --file-access=home org.test.Hello > info
|
|
|
|
assert_file_has_content info "^hidden$"
|
|
|
|
echo "ok info --file-access"
|