-
-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
536 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Redpanda | ||
|
||
Testcontainers can be used to automatically instantiate and manage [Redpanda](https://redpanda.com/) containers. | ||
More precisely Testcontainers uses the official Docker images for [Redpanda](https://hub.docker.com/r/redpandadata/redpanda) | ||
|
||
!!! note | ||
This module uses features provided in `docker.redpanda.com/redpandadata/redpanda`. | ||
|
||
## Install | ||
|
||
|
||
```bash | ||
npm install @testcontainers/redpanda --save-dev | ||
``` | ||
|
||
## Example | ||
|
||
<!--codeinclude--> | ||
[Connect:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToKafka | ||
<!--/codeinclude--> | ||
|
||
<!--codeinclude--> | ||
[Schema registry:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToSchemaRegistry | ||
<!--/codeinclude--> | ||
|
||
<!--codeinclude--> | ||
[Admin APIs:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToAdmin | ||
<!--/codeinclude--> | ||
|
||
<!--codeinclude--> | ||
[Rest Proxy:](../../packages/modules/redpanda/src/redpanda-container.test.ts) inside_block:connectToRestProxy | ||
<!--/codeinclude--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { Config } from "jest"; | ||
import * as path from "path"; | ||
|
||
const config: Config = { | ||
preset: "ts-jest", | ||
moduleNameMapper: { | ||
"^testcontainers$": path.resolve(__dirname, "../../testcontainers/src"), | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"name": "@testcontainers/redpanda", | ||
"version": "10.8.0", | ||
"license": "MIT", | ||
"keywords": [ | ||
"redpanda", | ||
"testing", | ||
"docker", | ||
"testcontainers" | ||
], | ||
"description": "Redpanda module for Testcontainers", | ||
"homepage": "https://github.com/testcontainers/testcontainers-node#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/testcontainers/testcontainers-node" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/testcontainers/testcontainers-node/issues" | ||
}, | ||
"main": "build/index.js", | ||
"files": [ | ||
"build" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"prepack": "shx cp ../../../README.md . && shx cp ../../../LICENSE .", | ||
"build": "tsc --project tsconfig.build.json" | ||
}, | ||
"dependencies": { | ||
"handlebars": "^4.7.8", | ||
"testcontainers": "^10.8.0" | ||
}, | ||
"devDependencies": { | ||
"kafkajs": "^2.2.4", | ||
"node-fetch": "^3.3.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Injected by testcontainers | ||
# This file contains cluster properties which will only be considered when | ||
# starting the cluster for the first time. Afterwards, you can configure cluster | ||
# properties via the Redpanda Admi n API. | ||
|
||
kafka_enable_authorization: false | ||
auto_create_topics_enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { RedpandaContainer, StartedRedpandaContainer } from "./redpanda-container"; |
Oops, something went wrong.