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
Using this method, one has to custom build a corresponding @EnabledIf-ish annotation, for example:
@EnabledIf(
value = "com.example.CustomDockerCheck#isDockerAvailable",
disabledReason = "docker not available for testcontainers"
)
classMyTest {
// ...
}
Provide a EnabledIfDockerAvailable annotation that is using the same detection mechanism as @Testcontainers / org.testcontaienrs.junit.jupiter.TestcontainersExtensions
Benefit
It saves people some boilerplate code in their user codebases.
Alternatives
Would you like to help contributing this feature?
Yes
The text was updated successfully, but these errors were encountered:
Module
None
Problem
When using
@Testcontainers
JUnit Extension, the test gets skipped if no docker is available when usingHowever there are cases where
@Testcontainers
can not be used, e.g. when a Container should live longer than for a single test ("Singleton container"). This is also described in the official docs here: https://java.testcontainers.org/test_framework_integration/manual_lifecycle_control/#singleton-containersUsing this method, one has to custom build a corresponding
@EnabledIf
-ish annotation, for example:Solution
Provide a
EnabledIfDockerAvailable
annotation that is using the same detection mechanism as@Testcontainers
/org.testcontaienrs.junit.jupiter.TestcontainersExtensions
Benefit
It saves people some boilerplate code in their user codebases.
Alternatives
Would you like to help contributing this feature?
Yes
The text was updated successfully, but these errors were encountered: