Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for multiple container start invocations with custom labels
When invoking .start() multiple times on the same DockerContainer instance, the call fails with "ValueError: The org.testcontainers namespace is reserved for internal use" error. Example code: ``` from testcontainers.core.container import DockerContainer container = DockerContainer("alpine:latest").with_kwargs(labels={}) container.start() container.stop() container.start() ``` The fix is to update labels for the container in a copy of the user-provided dictionary, so that: * the code doesn't mutate user structures * avoid side effects, allowing for multiple .start() invocations
- Loading branch information