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
There are times when a test should be skipped if Docker is not available, while at other times the test should fail. For example, one might want the containerized test to run on Mac or Linux, but not on Windows. This behavior should be easily configured. For example, in the WildFly codebase (from which these annotations were taken), a system property is examined to determine whether to skip or fail. This project needs this sort of flexibility.
For example
if (!isDockerAvailable()) {
if ("true".equals(System.getProperty("arquillian.testcontainers.require.docker"))) {
throw new RuntimeException("Docker is required but it is not available or is not properly configured");
} else {
throw createException(dockerRequired.value());
}
}
The text was updated successfully, but these errors were encountered:
jasondlee
changed the title
Test should (optionally) fail if container env not available
Tests should (optionally) fail if container env not available
Nov 15, 2024
Another option might be to have a system property like org.arquillian.testcontainers.required.exception=java.lang.AssertionError and allow the type to be overridden.
There are times when a test should be skipped if Docker is not available, while at other times the test should fail. For example, one might want the containerized test to run on Mac or Linux, but not on Windows. This behavior should be easily configured. For example, in the WildFly codebase (from which these annotations were taken), a system property is examined to determine whether to skip or fail. This project needs this sort of flexibility.
For example
The text was updated successfully, but these errors were encountered: