Skip to content

Commit 1ce1786

Browse files
committed
move the whole image name to version catalog
relates to gh-6998 Signed-off-by: Emanuel Trandafir <emanueltrandafir1993@gmail.com>
1 parent 4a94e16 commit 1ce1786

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ wavefront = "3.4.3"
7676
wiremock = "2.35.2"
7777
wiremock-junit5 = "1.3.1"
7878
# docker images for integration tests
79-
docker-otel-collector = "0.144.0"
79+
docker-otel-collector = "otel/opentelemetry-collector-contrib:0.144.0"
8080

8181
[libraries]
8282
activemqArtemisJakartaClient = { module = "org.apache.activemq:artemis-jakarta-client", version.ref = "activemq-artemis" }

implementations/micrometer-registry-otlp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ dependencies {
1515
}
1616

1717
dockerTest {
18-
systemProperty 'otel-collector-image.version', libs.versions.docker.otel.collector.get()
18+
systemProperty 'otel-collector-image.name', libs.versions.docker.otel.collector.get()
1919
}

implementations/micrometer-registry-otlp/src/test/java/io/micrometer/registry/otlp/OTelCollectorIntegrationTest.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ class OTelCollectorIntegrationTest {
4949

5050
private static final String CONFIG_FILE_NAME = "collector-config.yml";
5151

52-
private static final DockerImageName COLLECTOR_IMAGE = DockerImageName
53-
.parse("otel/opentelemetry-collector-contrib:" + getCollectorImageVersion());
52+
private static final DockerImageName COLLECTOR_IMAGE = getOtelCollectorImage();
5453

5554
@Container
5655
private final GenericContainer<?> container = new GenericContainer(COLLECTOR_IMAGE)
@@ -60,13 +59,13 @@ class OTelCollectorIntegrationTest {
6059
.waitingFor(Wait.forLogMessage(".*Everything is ready.*", 1))
6160
.waitingFor(Wait.forListeningPorts(4318));
6261

63-
private static String getCollectorImageVersion() {
64-
String version = System.getProperty("otel-collector-image.version");
65-
if (version == null) {
62+
private static DockerImageName getOtelCollectorImage() {
63+
String imageName = System.getProperty("otel-collector-image.name");
64+
if (imageName == null) {
6665
throw new IllegalStateException(
67-
"System property 'otel-collector-image.version' is not set. This should be set in the build configuration for running from the command line. If you are running OTelCollectorIntegrationTest from an IDE, set the system property to the desired collector image version.");
66+
"System property 'otel-collector-image.name' is not set. This should be set in the build configuration for running from the command line. If you are running OTelCollectorIntegrationTest from an IDE, set the system property to the desired collector imageName imageName.");
6867
}
69-
return version;
68+
return DockerImageName.parse(imageName);
7069
}
7170

7271
@Test

0 commit comments

Comments
 (0)