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

Bun can't run @testcontainers on a M1 machine #9661

Closed
emilienbidet opened this issue Mar 27, 2024 · 1 comment
Closed

Bun can't run @testcontainers on a M1 machine #9661

emilienbidet opened this issue Mar 27, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@emilienbidet
Copy link

What version of Bun is running?

1.0.35+940448d6b

What platform is your computer?

Darwin 23.1.0 arm64 arm

What steps can reproduce the bug?

I try to set up testcontainers for my tests.

Install the dependencies:

bun add @testcontainers/postgresql

Create a setup.ts file like this one:

import { beforeAll, afterAll } from "bun:test";
import {
  StartedPostgreSqlContainer,
  PostgreSqlContainer,
} from "@testcontainers/postgresql";

let container: StartedPostgreSqlContainer | undefined;

beforeAll(async () => {
  console.log("Starting database container");
  container = await startDatabaseContainer();
  const url = container.getConnectionUri();
});

afterAll(async () => {
  await container?.stop();
});

async function startDatabaseContainer() {
  return await new PostgreSqlContainer("postgres:15.0")
    .withUsername("postgres")
    .withPassword("local")
    .withDatabase("postgres")
    .start();
}

Then create a empty file foo.test.ts

Then runbun test --preload ./setup.ts

What is the expected behavior?

The container is up during the tests and the tests are executed. No crash

What do you see instead?

The tests crash and I get console message written:

bun test v1.0.35 (940448d6)

foo.test.ts:
dyld[26544]: missing symbol called
[1]    26544 killed     bun test

Additional information

I think there is a problem with the M1 chip. I checked by reinstalling bun using Roseta and I get the same behaviour.

@emilienbidet emilienbidet added the bug Something isn't working label Mar 27, 2024
@Electroid
Copy link
Contributor

Duplicate of #7810

@Electroid Electroid marked this as a duplicate of #7810 Mar 27, 2024
@Electroid Electroid closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants