generated from testcontainers/tc-guide-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Just cloning the repo and running tests seems to fail.
Error message:
> [email protected] test
> jest
(node:856308) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
FAIL src/customer-repository.test.js
● Customer Repository › should create and return multiple customers
10 |
11 | beforeAll(async () => {
> 12 | postgresContainer = await new PostgreSqlContainer().start();
| ^
13 | postgresClient = new Client({ connectionString: postgresContainer.getConnectionUri() });
14 | await postgresClient.connect();
15 | await createCustomerTable(postgresClient)
at getContainerRuntimeClient (node_modules/testcontainers/src/container-runtime/clients/client.ts:60:9)
at PostgreSqlContainer.start (node_modules/testcontainers/src/generic-container/generic-container.ts:81:20)
at PostgreSqlContainer.start (node_modules/@testcontainers/postgresql/src/postgresql-container.ts:39:43)
at Object.<anonymous> (src/customer-repository.test.js:12:29)
● Test suite failed to run
TypeError: Cannot read properties of undefined (reading 'end')
17 |
18 | afterAll(async () => {
> 19 | await postgresClient.end();
| ^
20 | await postgresContainer.stop();
21 | });
22 |
at Object.end (src/customer-repository.test.js:19:30)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.628 s
Ran all test suites.
Docker version:
Client: Docker Engine - Community
Version: 25.0.4
API version: 1.44
Go version: go1.21.8
Git commit: 1a576c5
Built: Wed Mar 6 16:32:12 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.4
API version: 1.44 (minimum version 1.24)
Go version: go1.21.8
Git commit: 061aa95
Built: Wed Mar 6 16:32:12 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Node v21.7.1
Ubuntu 22.04.4 LTS