diff --git a/README.md b/README.md index 382b2d3b..31faecf9 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,12 @@ and run with DEBUG=testcontainers* npm run test:testcontainers ``` +Normally the containers are removed after a run, however you can keep them for further inspection by adding this: + +``` +await container.stop({ remove: false }) +``` + ## Database This service is dependant on postgreSQL which will sync up across all nodes and will update cloudagent when needed. We use `knex` wrapper for wrapping [create, read, write, update] database quries. We also have different models for inserting and returning data which gives us a control of sensitive data or data we do not want to get along the record. We also use **zod** for enchanted validation. It's currently used in `src/models/db/types.ts` file. diff --git a/test/init.ts b/test/init.ts index 766170a2..31cbecd1 100644 --- a/test/init.ts +++ b/test/init.ts @@ -21,30 +21,6 @@ before(async function () { chaiJestSnapshot.resetSnapshotRegistry() }) -// do we want to keep this for debugging? -after(async function () { - // await Promise.all( - // aliceDepsContainers.map(async function (container) { - // await container.stop({ remove: false }) - // }) - // ) - // await Promise.all( - // bobContainers.map(async function (container) { - // await container.stop({ remove: false }) - // }) - // ) - // await Promise.all( - // charlieContainers.map(async function (container) { - // await container.stop({ remove: false }) - // }) - // ) - // await Promise.all( - // sharedContainers.map(async function (container) { - // await container.stop({ remove: false }) - // }) - // ) -}) - beforeEach(function () { chaiJestSnapshot.configureUsingMochaContext(this) }) diff --git a/test/integration/newConnection.test.ts b/test/integration/newConnection.test.ts index c4d9090a..7b99e734 100644 --- a/test/integration/newConnection.test.ts +++ b/test/integration/newConnection.test.ts @@ -39,7 +39,7 @@ describe('NewConnectionController', () => { }) afterEach(async () => { - await cleanupCloudagent() //errors here + await cleanupCloudagent() server.cloudagentEvents.stop() })