Skip to content

Commit 303430f

Browse files
Use /tmp for Kafka startup script (#1302)
1 parent 38fb397 commit 303430f

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

packages/modules/kafka/src/kafka-container-7.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ describe("KafkaContainer", { timeout: 240_000 }, () => {
1818
await using container = await new KafkaContainer(IMAGE).start();
1919

2020
await assertMessageProducedAndConsumed(container);
21+
22+
const { exitCode } = await container.exec([
23+
"sh",
24+
"-c",
25+
"test -f /tmp/testcontainers_start.sh && test ! -f /testcontainers_start.sh",
26+
]);
27+
28+
expect(exitCode).toBe(0);
2129
});
2230

2331
it("should connect using in-built zoo-keeper and custom network", async () => {

packages/modules/kafka/src/kafka-container.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const KAFKA_BROKER_PORT = 9092;
1919
const KAFKA_CONTROLLER_PORT = 9094;
2020
const DEFAULT_ZOOKEEPER_PORT = 2181;
2121
const DEFAULT_CLUSTER_ID = "4L6g3nShT-eMCtK--X86sw";
22-
const STARTER_SCRIPT = "/testcontainers_start.sh";
22+
const STARTER_SCRIPT = "/tmp/testcontainers_start.sh";
2323
const WAIT_FOR_SCRIPT_MESSAGE = "Waiting for script...";
2424

2525
// https://docs.confluent.io/platform/7.0.0/release-notes/index.html#ak-raft-kraft

0 commit comments

Comments
 (0)