diff --git a/Dockerfile.template b/Dockerfile.template index 4d82c0b1..0d33af11 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -106,7 +106,7 @@ COPY test ./test # most likely fail. # For now this also runs the legacy tests, that are slow, this is a # forcing function to finish the split between unit/integration -RUN npm run test:base +RUN npm run test # When running tests from a container built from this stage, # skip the mocha-pod setup diff --git a/README.md b/README.md index 72606b5e..68a4d817 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ integration tests require a containerized environment with the right dependencie To run type checks, and unit tests, you can use: ``` -npm run test:base +npm run test ``` The supervisor runs on Node v12.16.2, so using that specific @@ -190,7 +190,7 @@ version will ensure tests run in the same environment as production. In order to run all tests, unit and integration, [docker-compose](https://docs.docker.com/compose/) is required. -The following command will build the image for an `amd64` target (running `test:base` during the build) and setup +The following command will build the image for an `amd64` target (running `test` during the build) and setup the necessary dependencies for running integration tests. ``` @@ -216,7 +216,7 @@ docker exec -ti $(docker ps -q --filter="name=_sut") sh And then run all tests using ``` -npm run test +npm run test:node ``` For more information about testing the Supervisor, see the [testing README](test/README.md). diff --git a/package.json b/package.json index 8cb2a0c1..b3e8c79b 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ "test:node": "npm run test:unit && npm run test:integration && npm run test:legacy", "test:env": "docker-compose -f docker-compose.test.yml -f docker-compose.dev.yml up --build; npm run compose:down", "test:compose": "docker-compose -f docker-compose.yml -f docker-compose.test.yml up --build --remove-orphans --exit-code-from=sut ; npm run compose:down", - "test:base": "npm run lint && npm run test:build && npm run test:unit && npm run test:legacy", - "test": "npm run lint && npm run test:build && npm run test:node", + "test": "npm run lint && npm run test:build && npm run test:unit && npm run test:legacy", "compose:down": "docker-compose -f docker-compose.test.yml down", "prettify": "balena-lint -e ts -e js --typescript --fix src/ test/ typings/ build-utils/ webpack.config.js", "release": "tsc --project tsconfig.release.json && mv build/src/* build",