chore: restructure Docker helper methods #799
Merged
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?
this PR leverages the new internal
testcontainersdocker
package to move there a few utility functions used to check certain state in Docker, such asWe were not able to move the calculation of the daemonHost to the internal package because it's coupled with the DockerProvider struct, and moving the function to the internal would have caused a package cycle.
Therefore we are simply exposing the DaemonHost function in the DockerProvider struct, so that it can be consumed from anybody being able to obtain a DockerProvider instance using the NewDockerProvider function.
This new exposed function will call the already existing one, which was already private and easy to rename/move.
Why is it important?
These changes come with two major improvements:
Related issues