Added support of custom healthcheck to YdbDockerContainer#579
Added support of custom healthcheck to YdbDockerContainer#579alex268 merged 1 commit intoydb-platform:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #579 +/- ##
============================================
+ Coverage 62.83% 62.91% +0.08%
- Complexity 2460 2466 +6
============================================
Files 333 333
Lines 13975 13980 +5
Branches 1415 1416 +1
============================================
+ Hits 8781 8796 +15
+ Misses 4542 4533 -9
+ Partials 652 651 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This pull request adds support for custom healthcheck commands to the YdbDockerContainer. The feature allows users to specify a custom command for Docker container health checks via the YDB_DOCKER_HEALTHCHECK environment variable or programmatically through the YdbEnvironmentMock API. When no custom healthcheck is specified (or an empty string is provided), the container falls back to using Docker's built-in healthcheck mechanism.
Changes:
- Added dockerHealthcheckCmd configuration parameter to YdbEnvironment with support for environment variable
YDB_DOCKER_HEALTHCHECK - Modified YdbDockerContainer.init() to conditionally use custom healthcheck commands via Wait.forSuccessfulCommand() or default to Wait.forHealthcheck()
- Added test coverage for the new custom healthcheck functionality
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/common/src/main/java/tech/ydb/test/integration/YdbEnvironment.java | Added dockerHealthcheckCmd field and getter method to support custom healthcheck configuration |
| tests/common/src/test/java/tech/ydb/test/integration/YdbEnvironmentMock.java | Added mock support for dockerHealthcheck with setter and override methods |
| tests/common/src/main/java/tech/ydb/test/integration/docker/YdbDockerContainer.java | Implemented conditional logic to use custom healthcheck or default healthcheck based on configuration |
| tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java | Added new test for custom healthcheck and updated existing tests with additional assertions |
| tests/common/src/test/java/tech/ydb/test/integration/ProxyDockerTest.java | Added assertions to verify null auth token, null pem cert, and disabled TLS |
| tests/common/pom.xml | Configured YDB_DOCKER_REUSE environment variable for test execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java
Outdated
Show resolved
Hide resolved
tests/common/src/test/java/tech/ydb/test/integration/DockerHelperFactoryTest.java
Outdated
Show resolved
Hide resolved
tests/common/src/test/java/tech/ydb/test/integration/ProxyDockerTest.java
Show resolved
Hide resolved
tests/common/src/main/java/tech/ydb/test/integration/YdbEnvironment.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.