mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-18 21:27:54 +00:00
6d004f0994
This allows to run integration tests during development and on CI with the right dependencies. There are several changes that this involves, but the gist of it is that a test environment is setup using `docker-compose.test.yml`. This file is loaded by `resin-ci` during the build, and ensures that integration tests are ran after setting up all requirements. This commit also defines a test environment command that can be setup using `npm run test:env` in order to run tests in a local development machine.
24 lines
877 B
YAML
24 lines
877 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/boot/config.json:
|
|
from: test/data/config.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
|