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 <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy 2026-03-27 08:47:37 -04:00 committed by Sunil Mohan Adapa
parent 5b8e3b8f85
commit 5b615a169b
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 26 additions and 0 deletions

16
debian/tests/access-web-interface vendored Normal file
View File

@ -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/

10
debian/tests/control vendored
View File

@ -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