Skip to content

Commit

Permalink
Added documentation reference of how to start kafka with kraft.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilia Beliaev committed Mar 15, 2024
1 parent 59cba2a commit 11b6c9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/modules/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ npm install @testcontainers/kafka --save-dev
<!--codeinclude-->
[Connect to Kafka using SSL:](../../packages/modules/kafka/src/kafka-container.test.ts) inside_block:ssl
<!--/codeinclude-->

<!--codeinclude-->
[Connect to Kafka using Kraft:](../../packages/modules/kafka/src/kafka-container.test.ts) inside_block:connectKraft
<!--/codeinclude-->
2 changes: 2 additions & 0 deletions packages/modules/kafka/src/kafka-container.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,15 @@ describe("KafkaContainer", () => {
});
});

// connectKraft {
it("should connect using kraft", async () => {
const kafkaContainer = await new KafkaContainer().withKraft().withExposedPorts(9093).start();

await testPubSub(kafkaContainer);

await kafkaContainer.stop();
});
// }

it("should throw an error when using kraft and and confluence platfom below 7.0.0", async () => {
expect(() => new KafkaContainer("confluentinc/cp-kafka:6.2.14").withKraft()).toThrow(
Expand Down

0 comments on commit 11b6c9e

Please sign in to comment.