-
Notifications
You must be signed in to change notification settings - Fork 0
Tests
Tristan Israël edited this page Feb 25, 2026
·
3 revisions
This page describes the quality process and the tests made for Safecor.
The python source code is covered with unit tests. It includes the library and part of the scripts in safecor-core.
The tests can be ran in a python environment following this procedure (on Alpine Linux):
tests.sh
# Install python3
apk add python3 py3-pip
python3 -m pip install --upgrade pip
python3 -m venv .venv
# Install dependencies
source .venv/bin/activate
cd python
python3 -m pip install -r requirements.txt
python3 -m pip install black ruff mypy coverage bandit pip-audit
# Format check
black --check .
# Lint
ruff check .
# Type checking
mypy .
# Unit tests and calculate coverage
coverage run --omit="tests/*,*/tests/*" -m unittest discover -s tests -v
coverage report --fail-under=80
The Tests app is designed to run all functional and non-regression tests on a fully compatible system.
- Download the ISO image
- Put it on a USB key using
Rufusordd - Boot on the USB key
This section describes the functional and non-regression tests.
Steps:
- Partition an external storage with multiple partitions (for example FAT and ExFAT or ExFAT and NTFS).
- Run the script
fill-test-input-disk.shand give the path of one of the mount points as argument. For example$ ./fill-test-input-disk.sh /media/part_fat. - Run the script again to fill the other partitions created.
- Start the test appliance.
- Run the test plan.
- Connect the storage when asked.