Open oneEdoubleD opened 4 years ago
The error when tearing down is:
Error: (HTTP code 500) server error - cannot stop container: cardano-test-yarn: Cannot kill container a7e51522bca42608103508bb43b9af4bb4d01df4bd4c892156088e9bdf439be3: unknown error after kill: runc did not terminate sucessfully: container_linux.go:392: signaling init process caused "permission denied"
: unknown
at /home/edd/Workspace/cardano-rosetta/node_modules/docker-modem/lib/modem.js:301:17
at getCause (/home/edd/Workspace/cardano-rosetta/node_modules/docker-modem/lib/modem.js:331:7)
at Modem.buildPayload (/home/edd/Workspace/cardano-rosetta/node_modules/docker-modem/lib/modem.js:300:5)
at IncomingMessage.<anonymous> (/home/edd/Workspace/cardano-rosetta/node_modules/docker-modem/lib/modem.js:275:14)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Note I ran the test with sudo
.
You shouldn't be running yarn
with sudo
, so this particular situation is expected. The real exception here is when the setup fails for some reason, such as the host port is not available, and the container is not attempted to be cleaned up.
When running
yarn test
I'm getting this error about the test container not being cleaned up correctly. It can be worked around by changing line 7 oftest/e2e/jest-setup/docker.ts
fromconst CONTAINER_NAME = 'cardano-test';
to another name such ascardano-test-yarn
, however you'd need to change this name every time you run the test suite.