FreedomBox/.ci/functional-tests.yml
Sunil Mohan Adapa 24d2d92ab5
Run service using systemd even for development
- This means that systemd sandbox will be in effect even during development. We
won't miss out on bugs in sandbox configuration.

- We won't have disable systemd sandbox features just because we can test
properly on development setup. Such as JoinsNamespaceOf=.

- This also leads to significant reduction in hacky code for setting up for
development and functional tests.

- One disadvantage is that first setup is run before user gets a chance to
interact with the started container/VM. However, this is okay since first setup
can be re-run easily by removing the /var/lib/plinth/plinth.sqlite3 file and
also the need for doing this is rare.

Tests:

- Start a fresh container and run functional tests with './container run-tests'
on it. The tests run as expected (succeed or fail).

- While first setup is in progress, running the command 'make
wait-while-first-setup' waits while printing dots. After the first setup is
done, it exists.

- Running the command freedombox-logs shows FreedomBox logs for both the web and
privileged services.

- Changing a source code file in the /freedombox directory (or on the host)
leads to a restart of the Plinth web service.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2025-11-03 13:54:00 +02:00

28 lines
791 B
YAML

---
# SPDX-License-Identifier: AGPL-3.0-or-later
.run-functional-tests:
stage: functional-tests
needs: []
dependencies: []
tags:
- functional-tests
timeout: 10h
# Need to find another way of running the cleanup step even on failure
allow_failure: true
except:
- $GITLAB_USER_LOGIN == "weblate"
before_script:
- apt-get update
- apt-get -y install make
- make provision-dev
- make wait-while-first-setup
script:
- FREDOMBOX_URL=https://localhost FREEDOMBOX_SSH_PORT=22 FREEDOMBOX_SAMBA_PORT=445 pytest -v --durations=10 --include-functional --splinter-headless --instafail --template=html1/index.html --report=functional-tests.html
artifacts:
when: always
paths:
- functional-tests.html
- screenshots/
- plinth.log