You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide generic DockerContainer with init attributes #236
First I want to thank you for this very nice and convenient library.
Background
I am using the library for smoke tests for microservices. In these tests I spin up a container and make sure I can e.g., fetch an endpoint and see that the container is built and starts correctly.
The library provides all convenient methods, except for a way to set e.g., ports and env variables in the context manager. To solve this I have subclassed testcontainers.core.container.DockerContainer into a class as below:
Yes, that's probably a good idea because we already support all the other (less commonly used) arguments through keyword arguments. Are you open to submitting a PR?
Regarding GenericContainer, I deprecated it because it's the same as DockerContainer just with a different name.
Activity
tillahoffmann commentedon Aug 24, 2022
Yes, that's probably a good idea because we already support all the other (less commonly used) arguments through keyword arguments. Are you open to submitting a PR?
Regarding
GenericContainer, I deprecated it because it's the same asDockerContainerjust with a different name.vikahl commentedon Aug 24, 2022
I'm happy to submit a PR!
Add CustomContainer exposing settings through the class
Add CustomContainer exposing settings through the class
vikahl commentedon Aug 25, 2022
Submitted a PR, happy for a review.
Update core container so that settings can be set in init
Update core container so that settings can be set in init