From b3d4f5718b39f02f32351c042d91bf2d7ef08335 Mon Sep 17 00:00:00 2001 From: Helena Adamkova <58051865+Ellenn-A@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:26:05 +0000 Subject: [PATCH] containers removed --- README.md | 6 ++++++ test/init.ts | 24 ------------------------ test/integration/newConnection.test.ts | 2 +- 3 files changed, 7 insertions(+), 25 deletions(-) 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() })