Skip to content

feat(testing): Add docker-test.sh for running tests in a Docker container#4

Closed
compwright wants to merge 4 commits intocompwright:masterfrom
hughsw:docker-test-in-one-script
Closed

feat(testing): Add docker-test.sh for running tests in a Docker container#4
compwright wants to merge 4 commits intocompwright:masterfrom
hughsw:docker-test-in-one-script

Conversation

@compwright
Copy link
Owner

Copy of bee-queue#239 by @hughsw:

Use a single script, docker-test.sh to build an image and run a container to do testing.

This is a less intrusive, more focussed version of bee-queue#234

$ ./docker-test.sh  --help

docker-test.sh -- Run standard bee-queue tests in a Docker container with a Redis server

Usage: docker-test.sh [command ...args]

The optional command and args specify what to run in the container (default: npm test).

You can use tools or run scripts from package.json, e.g.

  ./docker-test.sh  npx ava --serial --fail-fast --verbose --no-color --timeout 30000
  ./docker-test.sh  npm run coverage

If you want to work interactively in the container, run a shell, e.g.

  ./docker-test.sh  bash

Notes:
- The very first time this script is used it takes a while for Docker to
  download the base image and to populate its caches.
- You can ignore the Transparent Huge Pages warning from the Redis server.

@compwright compwright added the enhancement New feature or request label Nov 21, 2022
@compwright compwright closed this Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments