balena-supervisor/.mochapodrc.yml
Felipe Lalanne f19f70d690 Migrate update-lock tests as integration tests
Update-lock tests now use the actual filesystem for testing, instead of
relying on stubs and spies.

This commit also fixes a small bug with update-lock that would cause a
`PromiseRejectionHandledWarning` when the lock callback would throw.
2022-09-28 10:37:41 -03:00

26 lines
960 B
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
/mnt/boot/config.txt:
from: test/data/mnt/boot/config.txt
/mnt/boot/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
- /mnt/root/tmp/balena-supervisor/**/*.lock