-
-
Notifications
You must be signed in to change notification settings - Fork 500
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: WithLogger ContainerCustomizer support #2259
Merged
Merged
Conversation
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
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
stevenh
force-pushed
the
feat/request-logger
branch
from
February 21, 2024 22:41
981e63a
to
583e43b
Compare
mdelapenya
reviewed
Feb 22, 2024
stevenh
force-pushed
the
feat/request-logger
branch
3 times, most recently
from
February 22, 2024 13:51
bf019b2
to
97ea5e4
Compare
mdelapenya
reviewed
Feb 22, 2024
Add support to use WithLogger as a ContainerCustomizer so that callers have an easy way to configure the logger of a container. Add tests for WithLogger. Validate Logger and LoggerOption implement the required interfaces.
stevenh
force-pushed
the
feat/request-logger
branch
from
February 22, 2024 19:12
97ea5e4
to
0fed43a
Compare
mdelapenya
reviewed
Feb 23, 2024
Add a note about WithLogger being used before other functions so it can capture any logging they may generate. Co-authored-by: Manuel de la Peña <social.mdelapenya@gmail.com>
mdelapenya
approved these changes
Mar 1, 2024
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.
LGTM, thanks for adding this customisation of the container request!
mdelapenya
added a commit
to jespino/testcontainers-go
that referenced
this pull request
Mar 1, 2024
* main: chore: bump Go version to 1.21 (testcontainers#2292) chore(deps): bump github.com/ClickHouse/clickhouse-go/v2 (testcontainers#2226) feat: WithLogger ContainerCustomizer support (testcontainers#2259) chore(deps): bump github.com/jackc/pgx/v5 in /modules/cockroachdb (testcontainers#2217) Move the file and mounts tests into a test package (testcontainers#2270) Fix Dockerfile not located when added to dockerignore (testcontainers#2272)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add support to use
WithLogger
as aContainerCustomizer
so that callers have an easy way to configure the logger of a container.Add tests for
WithLogger
.Validate
Logger
andLoggerOption
implement the required interfaces.Also fix a comment typo and remove an unneeded return.
Why is it important?
Allows users to easily configure container loggers which is useful when using modules e.g. postgres or redis.
How to test this PR
go test -run=^TestWithLogger$