-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add interface to customize CreateContainerCmd #7421
Conversation
Add `CreateContainerCmdCustomizer` interface to customize `CreateContainerCmd`. Customization is applied after Testcontainers configuration is set.
31293c2
to
3a02788
Compare
@@ -1495,6 +1510,11 @@ public SELF withCreateContainerCmdModifier(Consumer<CreateContainerCmd> modifier | |||
return self(); | |||
} | |||
|
|||
public SELF withCreateContainerCmdCustomizer(CreateContainerCmdCustomizer customizer) { |
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.
We should think about either deprecating withCreateContainerCmdModifier
or adding an overload, to avoid increasing the API surface. Maybe, as a first step, we could keep withCreateContainerCmdModifier
only but make it populate localCreateContainerCustomizers
?
Also, if we name it CreateContainerCmdModifier
, then we could align both APIs and not have to deprecate the old one (just thinking out loud...) - WDYT?
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.
looks like I forgot something when trying to overload withCreateContainerCmdModifier
🙈. Now, this is done. My only question is about the location where createContainerCmdCustomizers
is being called because createContainerCmdModifiers
is currently called before. I think the current implementation is ok and we should drop createContainerCmdModifiers
references due to are not being used.
Add
CreateContainerCmdModifier
interface to customizeCreateContainerCmd
via SPI (global customization). Also,withCreateContainerCmdModifier
can be used too for localcustomization.
Customization is applied after Testcontainers configuration is set.