mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-24 15:56:40 +00:00
827f892c13
This means that configuration backend tests no longer use stubs and (mostly) avoid internal dependencies in the tests. Instead of stubs and mock-fs, the tests use [testfs](https://github.com/balena-io-modules/mocha-pod#working-with-the-filesystem) which allows working with a real filesystem and ensuring everything is re-set between tests. This is the last change needed in order to be able to merge #1971. Here is the list of changes - [x] Migrate splash image backend tests - [x] Migrate extlinux backend tests - [x] Migrate config.txt backend tests - [x] Migrate extra-uenv config tests - [x] Migrate odmdata config tests - [x] Migrate config utils tests - [x] Migrate device-config tests Change-type: patch
29 lines
1.0 KiB
YAML
29 lines
1.0 KiB
YAML
# This defines default configuration that
|
|
# should apply to all mocha-pod/testfs instances
|
|
testfs:
|
|
# These are test files that need to be configured
|
|
# for all tests. The `from` defines where to find
|
|
# them in the local source. These can be overriden
|
|
# in the `testfs` configuration.
|
|
filesystem:
|
|
/mnt/root:
|
|
/mnt/boot:
|
|
config.json:
|
|
from: test/data/testconfig.json
|
|
config.txt:
|
|
from: test/data/mnt/boot/config.txt
|
|
device-type.json:
|
|
from: test/data/mnt/boot/device-type.json
|
|
/etc/os-release:
|
|
from: test/data/etc/os-release
|
|
# The `keep` list defines files that already exist in the
|
|
# filesystem and need to be backed up before setting up the test environment
|
|
keep: []
|
|
# The `cleanup` list defines files created by the tests that need to be removed
|
|
# when restoring the filesystem
|
|
cleanup:
|
|
- /data/database.sqlite
|
|
- /data/apps.json.preloaded
|
|
- /mnt/root/tmp/balena-supervisor/**/*.lock
|
|
- /mnt/root/mnt/boot/splash/*.png
|