Fixes and improvements#2
Merged
rw4lll merged 8 commits intofeat/docker-engine-api-clientfrom Sep 29, 2024
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several significant changes to the
Testcontainerslibrary, focusing on improving container management, adding new exceptions, and enhancing port handling. Below are the most important changes, grouped by theme:Container Management Enhancements:
src/Container/GenericContainer.php: Refactored thestartmethod to include retry logic and image pulling, addedcreateContainerConfigandcreateHostConfigmethods for better configuration handling.src/Container/GenericContainer.php: IntroducedPortGeneratorwithRandomUniquePortGeneratoras the default, and addedwithPortGeneratormethod. [1] [2]src/Container/GenericContainer.php: UpdatedwithHealthCheckCommandto use more detailed health check configurations.Port Handling Improvements:
src/Container/Container.php: AddedFixedPortGeneratorfor fixed port assignments.src/Container/GenericContainer.php: Replaced inline port normalization withPortNormalizer::normalizePort.src/Container/InternetProtocol.php: IntroducedInternetProtocolenum for better IP protocol handling.New Exception Classes:
src/Exception/ContainerException.php: Added baseContainerExceptionclass.src/Exception/ContainerStateException.php: IntroducedContainerStateExceptionfor container state retrieval issues.src/Exception/HealthCheckFailedException.php: AddedHealthCheckFailedExceptionfor health check failures.src/Exception/HealthCheckNotConfiguredException.php: AddedHealthCheckNotConfiguredExceptionfor unconfigured health checks.Specific Container Updates:
src/Container/MariaDBContainer.php,src/Container/MySQLContainer.php,src/Container/OpenSearchContainer.php,src/Container/PostgresContainer.php,src/Container/RedisContainer.php: Updated constructors to useFixedPortGeneratorfor specific ports. [1] [2] [3] [4] [5]These changes collectively improve the robustness, configurability, and error handling of the
Testcontainerslibrary.