-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
feat: add Elasticsearch module #1574
feat: add Elasticsearch module #1574
Conversation
Command: "go run . new module --image elasticsearch:8.0.0 --name elasticsearch --title Elasticsearch"
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -89,8 +89,6 @@ func read() Config { | |||
return applyEnvironmentConfiguration(config) | |||
} | |||
|
|||
fmt.Printf("Testcontainers properties file has been found: %s\n", tcProp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed this print was here affecting the Go Examples, which matches the output of a test. That's why I'm removing it here
@@ -0,0 +1,100 @@ | |||
package elasticsearch_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using Go examples for first time: I'm going to add them to all the modules, and the module generator, as they are true executable documentation that will land into the https://pkg.go.dev/github.com/testcontainers/testcontainers-go docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another massive benefit is that code snippets to our docs site will be taken from the examples, therefore no test code will be copy&pasted.
* main: chore(deps): bump mkdocs-material from 8.2.7 to 9.2.8 (testcontainers#1580) feat: add Elasticsearch module (testcontainers#1574)
What does this PR do?
This PR adds a Go module for Elasticsearch including the following features:
For Elasticsearch 7 and below:
For Elasticsearch 8 and above:
As we mentioned, the container exposes setting to create an HTTP connection. It's responsibility of the consumer to build it properly. For demonstration purpose, we have included examples and tests showing how to create the connection with:
Why is it important?
Adding modules is always great, but in particular Elasticsearch is a widely used technology.