mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-04-10 04:39:55 +00:00
Improve test:compose and test:env commands
The commands now use docker-compose run instead of docker compose up for simplicity and also to match what flowzone does. Change-type: patch
This commit is contained in:
parent
e2f54e29fa
commit
2f3e3d2e61
11
README.md
11
README.md
@ -39,7 +39,6 @@ Here's a few guidelines to make the process easier for everyone involved.
|
||||
- Commits should be squashed as much as makes sense.
|
||||
- Commits should be signed-off (`git commit -s`)
|
||||
|
||||
|
||||
## Developing the supervisor
|
||||
|
||||
### Requirements
|
||||
@ -64,9 +63,9 @@ npm ci
|
||||
|
||||
We explicitly use `npm ci` over `npm install` to ensure the correct package versions are installed. More documentation for this can be found [here](https://docs.npmjs.com/cli/ci) on the npm cli docs.
|
||||
|
||||
You're now ready to start developing.
|
||||
You're now ready to start developing.
|
||||
|
||||
### Running your code
|
||||
### Running your code
|
||||
|
||||
By far the most convenient way to test your supervisor code is
|
||||
to download a development image of balenaOS from the
|
||||
@ -216,12 +215,6 @@ Alternatively, you can launch a test environment using the following commands.
|
||||
```
|
||||
# Launch the environment
|
||||
npm run test:env
|
||||
|
||||
# In another terminal, access the sut container
|
||||
docker-compose exec -i sut sh
|
||||
|
||||
# Or alternatively, access the sut container using docker exec
|
||||
docker exec -ti $(docker ps -q --filter="name=_sut") sh
|
||||
```
|
||||
|
||||
And then run all tests using
|
||||
|
@ -17,8 +17,8 @@
|
||||
"test:integration:single": "find test/integration -name *.spec.ts | xargs mocha --config test/integration/.mocharc.js",
|
||||
"test:legacy": "mocha --config test/legacy/.mocharc.js",
|
||||
"test:node": "npm run test:unit && npm run test:integration && npm run test:legacy",
|
||||
"test:env": "ARCH=$(./build-utils/detect-arch.sh) docker compose -f docker-compose.test.yml -f docker-compose.dev.yml up --build; npm run compose:down",
|
||||
"test:compose": "ARCH=$(./build-utils/detect-arch.sh) docker compose -f docker-compose.yml -f docker-compose.test.yml up sut --build --remove-orphans --exit-code-from=sut ; npm run compose:down",
|
||||
"test:env": "ARCH=$(./build-utils/detect-arch.sh) docker compose -f docker-compose.test.yml -f docker-compose.dev.yml run --build --rm sut sh; npm run compose:down",
|
||||
"test:compose": "(ARCH=$(./build-utils/detect-arch.sh) docker compose -f docker-compose.yml -f docker-compose.test.yml run --build --rm sut || docker compose logs); npm run compose:down",
|
||||
"test": "npm run lint && npm run test:build && npm run test:unit",
|
||||
"compose:down": "docker compose -f docker-compose.yml -f docker-compose.test.yml down --volumes",
|
||||
"prettify": "balena-lint -e ts -e js --fix src/ test/ typings/ build-utils/ webpack.config.js",
|
||||
|
Loading…
x
Reference in New Issue
Block a user