Skip to content

Commit 59a62f4

Browse files
authored
Add Redpanda module (#743)
1 parent 0bc8c42 commit 59a62f4

File tree

12 files changed

+536
-2
lines changed

12 files changed

+536
-2
lines changed

docs/modules/redpanda.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Redpanda
2+
3+
Testcontainers can be used to automatically instantiate and manage [Redpanda](https://redpanda.com/) containers.
4+
More precisely Testcontainers uses the official Docker images for [Redpanda](https://hub.docker.com/r/redpandadata/redpanda)
5+
6+
!!! note
7+
This module uses features provided in `docker.redpanda.com/redpandadata/redpanda`.
8+
9+
## Install
10+
11+
12+
```bash
13+
npm install @testcontainers/redpanda --save-dev
14+
```
15+
16+
## Example
17+
18+
<!--codeinclude-->
19+
[Connect:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToKafka
20+
<!--/codeinclude-->
21+
22+
<!--codeinclude-->
23+
[Schema registry:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToSchemaRegistry
24+
<!--/codeinclude-->
25+
26+
<!--codeinclude-->
27+
[Admin APIs:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToAdmin
28+
<!--/codeinclude-->
29+
30+
<!--codeinclude-->
31+
[Rest Proxy:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToRestProxy
32+
<!--/codeinclude-->

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ nav:
5858
- PostgreSQL: modules/postgresql.md
5959
- Qdrant: modules/qdrant.md
6060
- Redis: modules/redis.md
61+
- Redpanda: modules/redpanda.md
6162
- Selenium: modules/selenium.md
6263
- Weaviate: modules/weaviate.md
6364
- Configuration: configuration.md

package-lock.json

Lines changed: 149 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { Config } from "jest";
2+
import * as path from "path";
3+
4+
const config: Config = {
5+
preset: "ts-jest",
6+
moduleNameMapper: {
7+
"^testcontainers$": path.resolve(__dirname, "../../testcontainers/src"),
8+
},
9+
};
10+
11+
export default config;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "@testcontainers/redpanda",
3+
"version": "10.8.0",
4+
"license": "MIT",
5+
"keywords": [
6+
"redpanda",
7+
"testing",
8+
"docker",
9+
"testcontainers"
10+
],
11+
"description": "Redpanda module for Testcontainers",
12+
"homepage": "https://github.com/testcontainers/testcontainers-node#readme",
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/testcontainers/testcontainers-node"
16+
},
17+
"bugs": {
18+
"url": "https://github.com/testcontainers/testcontainers-node/issues"
19+
},
20+
"main": "build/index.js",
21+
"files": [
22+
"build"
23+
],
24+
"publishConfig": {
25+
"access": "public"
26+
},
27+
"scripts": {
28+
"prepack": "shx cp ../../../README.md . && shx cp ../../../LICENSE .",
29+
"build": "tsc --project tsconfig.build.json"
30+
},
31+
"dependencies": {
32+
"handlebars": "^4.7.8",
33+
"testcontainers": "^10.8.0"
34+
},
35+
"devDependencies": {
36+
"kafkajs": "^2.2.4",
37+
"node-fetch": "^3.3.2"
38+
}
39+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Injected by testcontainers
2+
# This file contains cluster properties which will only be considered when
3+
# starting the cluster for the first time. Afterwards, you can configure cluster
4+
# properties via the Redpanda Admi n API.
5+
6+
kafka_enable_authorization: false
7+
auto_create_topics_enabled: true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { RedpandaContainer, StartedRedpandaContainer } from "./redpanda-container";

0 commit comments

Comments
 (0)