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
| return self(); | ||
| } | ||
|
|
||
| public SELF withCreateContainerCmdCustomizer(CreateContainerCmdCustomizer customizer) { |
There was a problem hiding this comment.
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.
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
CreateContainerCmdModifierinterface to customizeCreateContainerCmdvia SPI (global customization). Also,withCreateContainerCmdModifiercan be used too for localcustomization.
Customization is applied after Testcontainers configuration is set.