Deprecate TestUtils.dockerRegistryFromEnv()
The Testcontainers rely on the `TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX` ENV var and build proper image name automatically. * Deprecate `TestUtils.dockerRegistryFromEnv()` and remove its usage in the project
This commit is contained in:
@@ -19,9 +19,6 @@ package org.springframework.integration.jdbc.mysql;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.containers.MySQLContainer;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import org.testcontainers.utility.DockerImageName;
|
||||
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
|
||||
/**
|
||||
* The base contract for JUnit tests based on the container for MqSQL.
|
||||
|
||||
@@ -20,8 +20,6 @@ import org.junit.jupiter.api.BeforeAll;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
|
||||
/**
|
||||
* The base contract for JUnit tests based on the container for MQTT Mosquitto broker.
|
||||
* The Testcontainers 'reuse' option must be disabled,so, Ryuk container is started
|
||||
@@ -37,7 +35,7 @@ import org.springframework.integration.test.util.TestUtils;
|
||||
public interface MosquittoContainerTest {
|
||||
|
||||
GenericContainer<?> MOSQUITTO_CONTAINER =
|
||||
new GenericContainer<>(TestUtils.dockerRegistryFromEnv() + "eclipse-mosquitto:2.0.12")
|
||||
new GenericContainer<>("eclipse-mosquitto:2.0.12")
|
||||
.withCommand("mosquitto -c /mosquitto-no-auth.conf")
|
||||
.withExposedPorts(1883);
|
||||
|
||||
|
||||
@@ -375,6 +375,12 @@ public abstract class TestUtils {
|
||||
ctx.updateLoggers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Take a Docker Hub url from ENV var.
|
||||
* @return a Docker Hub url from ENV var.
|
||||
* @deprecated since 5.5.13 in favor of standard {@code TESTCONTAINERS_HUB_IMAGE_NAME_PREFIX} ENV var
|
||||
*/
|
||||
@Deprecated
|
||||
public static String dockerRegistryFromEnv() {
|
||||
return Optional.ofNullable(System.getenv("DOCKER_REGISTRY_URL")).orElse("");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user