Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloning repo and running tests fails #3

Open
JackMBurch opened this issue Mar 18, 2024 · 6 comments
Open

Cloning repo and running tests fails #3

JackMBurch opened this issue Mar 18, 2024 · 6 comments
Assignees
Labels

Comments

@JackMBurch
Copy link

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

@javierlopezdeancos javierlopezdeancos added enhancement New feature or request triage and removed enhancement New feature or request labels Mar 19, 2024
@javierlopezdeancos javierlopezdeancos self-assigned this Mar 19, 2024
@javierlopezdeancos
Copy link
Contributor

Hey @JackMBurch thanks to raise the issue,

I run the project clone && install fresh and is passing test for me

Can you try to repeat a fresh cloning install with the Node LTS version 20.11.1 and npm 10.2.4,?

@JackMBurch
Copy link
Author

Thank you for the quick response!

Tried and still getting the same thing with Node 20.11.1 and npm 10.2.4.

@javierlopezdeancos
Copy link
Contributor

let me investigate installing a VM with ubuntu on my mac to try it

@JackMBurch
Copy link
Author

Much appreciated 🙏

@javierlopezdeancos
Copy link
Contributor

you know what, you are right

Captura de pantalla 2024-03-21 a las 20 36 10 this is my vm running an ubuntu LTS So let me take a look

@kiview
Copy link
Member

kiview commented Apr 25, 2024

Are we getting different dependencies pulled on Ubuntu as compared to macOS? Looks like an issue with the Postgres client library to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants