Skip to content

Conversation

@hughsw
Copy link
Collaborator

@hughsw hughsw commented Apr 20, 2020

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 #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.

@hughsw hughsw requested a review from skeggse April 20, 2020 12:19
@coveralls
Copy link

coveralls commented Apr 20, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling a8c9d0f on hughsw:docker-test-in-one-script into 3430506 on bee-queue:master.

@compwright compwright changed the title feat(testing): Add docker-test.sh for running tests in a Docker container feat(tests): Add docker-test.sh for running tests in a Docker container Nov 22, 2022
@compwright
Copy link
Collaborator

Resubmitted as #554

@compwright compwright closed this Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants