From 5b615a169b70926cba41877271ff573a3fe86033 Mon Sep 17 00:00:00 2001 From: James Valleroy Date: Fri, 27 Mar 2026 08:47:37 -0400 Subject: [PATCH] debian: tests: Add test to access interface status Tests: - Build the Debian package and run autopkgtest with qemu backend. The test is passed. - Revert the recent fix for loading icons. Build the Debian package and run autopkgtests again. It is failed due to maximum redirects followed. Signed-off-by: James Valleroy Reviewed-by: Sunil Mohan Adapa --- debian/tests/access-web-interface | 16 ++++++++++++++++ debian/tests/control | 10 ++++++++++ 2 files changed, 26 insertions(+) create mode 100644 debian/tests/access-web-interface diff --git a/debian/tests/access-web-interface b/debian/tests/access-web-interface new file mode 100644 index 000000000..34e70530a --- /dev/null +++ b/debian/tests/access-web-interface @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +# Wait for FreedomBox setup to complete. +sleep 30 + +journalctl --unit=plinth --unit=freedombox-privileged + +# Get FreedomBox status +curl --location --cookie "" --fail --write-out "%{response_code}" --insecure \ + --stderr - https://localhost/freedombox/status/ + +# Access FreedomBox interface +curl --location --cookie "" --fail --write-out "%{response_code}" --insecure \ + --stderr - https://localhost/freedombox/ diff --git a/debian/tests/control b/debian/tests/control index 87e9e7256..c36b03ecd 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -16,3 +16,13 @@ Restrictions: needs-root, breaks-testbed Test-Command: PYTHONPATH='/usr/lib/python3/dist-packages/' py.test-3 -p no:cacheprovider --cov=plinth --cov-report=html:debci/htmlcov --cov-report=term Depends: e2fsprogs, git, python3-pytest, python3-pytest-cov, python3-pytest-django, @ Restrictions: breaks-testbed + +# +# Try to access the FreedomBox web interface. +# +# iptables package installs alternatives files, with iptables-nft as default alternative. +# Without it, firewalld has this error: INVALID_IPV: 'ipv4' is not a valid backend or is unavailable +# +Tests: access-web-interface +Depends: iptables, @ +Restrictions: needs-root, isolation-machine, breaks-testbed