Move code out of testcontainers-all into relevant modules
This commit is contained in:
committed by
Phillip Webb
parent
fb886a1818
commit
183a0fbdf5
@@ -130,7 +130,6 @@ include "spring-boot-project:spring-boot-sql"
|
||||
include "spring-boot-project:spring-boot-test"
|
||||
include "spring-boot-project:spring-boot-test-autoconfigure"
|
||||
include "spring-boot-project:spring-boot-testcontainers"
|
||||
include "spring-boot-project:spring-boot-testcontainers-all"
|
||||
include "spring-boot-project:spring-boot-thymeleaf"
|
||||
include "spring-boot-project:spring-boot-tomcat"
|
||||
include "spring-boot-project:spring-boot-tools:spring-boot-antlib"
|
||||
|
||||
@@ -2124,7 +2124,6 @@ bom {
|
||||
"spring-boot-test",
|
||||
"spring-boot-test-autoconfigure",
|
||||
"spring-boot-testcontainers",
|
||||
"spring-boot-testcontainers-all",
|
||||
"spring-boot-thymeleaf",
|
||||
"spring-boot-tomcat",
|
||||
"spring-boot-tracing",
|
||||
|
||||
@@ -258,7 +258,7 @@ dependencies {
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-security"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-test"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-test-autoconfigure"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-testcontainers-all"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-testcontainers"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-tomcat"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-cli"))
|
||||
implementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
|
||||
|
||||
@@ -4,6 +4,7 @@ plugins {
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
@@ -17,6 +18,7 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
optional(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
optional("ch.qos.logback:logback-classic")
|
||||
optional("io.micrometer:micrometer-java21")
|
||||
optional("io.micrometer:micrometer-registry-appoptics")
|
||||
@@ -43,6 +45,11 @@ dependencies {
|
||||
optional("org.apache.kafka:kafka-streams")
|
||||
optional("org.apache.logging.log4j:log4j-core")
|
||||
optional("org.aspectj:aspectjweaver")
|
||||
optional("org.testcontainers:grafana")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("io.rest-assured:rest-assured")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
testFixturesImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.metrics.testcontainers.otlp;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.metrics.testcontainers.otlp;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.metrics.testcontainers.otlp;
|
||||
|
||||
import org.testcontainers.grafana.LgtmStackContainer;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.metrics.testcontainers.otlp;
|
||||
|
||||
import org.testcontainers.containers.Container;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -15,6 +15,6 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support for testcontainers OpenTelemetry service connections.
|
||||
* Support for Testcontainers OpenTelemetry metrics service connections.
|
||||
*/
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.metrics.testcontainers.otlp;
|
||||
@@ -1,3 +1,8 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.metrics.testcontainers.otlp.GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.metrics.testcontainers.otlp.OpenTelemetryMetricsContainerConnectionDetailsFactory
|
||||
|
||||
# Failure Analyzers
|
||||
org.springframework.boot.diagnostics.FailureAnalyzer=\
|
||||
org.springframework.boot.metrics.ValidationFailureAnalyzer
|
||||
|
||||
@@ -16,7 +16,12 @@ dependencies {
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
optional("io.opentelemetry:opentelemetry-exporter-otlp")
|
||||
optional("org.testcontainers:grafana")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.opentelemetry.testcontainers;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.grafana.LgtmStackContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.opentelemetry.testcontainers;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -24,10 +24,10 @@ import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingConnectionDetails;
|
||||
import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.OpenTelemetryLoggingExportAutoConfiguration;
|
||||
import org.springframework.boot.opentelemetry.actuate.autoconfigure.logging.Transport;
|
||||
import org.springframework.boot.testcontainers.service.connection.ServiceConnection;
|
||||
import org.springframework.boot.testsupport.container.TestImage;
|
||||
import org.springframework.boot.tracing.autoconfigure.otlp.OtlpTracingAutoConfiguration;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
|
||||
|
||||
@@ -59,7 +59,7 @@ class OpenTelemetryLoggingContainerConnectionDetailsFactoryIntegrationTests {
|
||||
}
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@ImportAutoConfiguration(OtlpTracingAutoConfiguration.class)
|
||||
@ImportAutoConfiguration(OpenTelemetryLoggingExportAutoConfiguration.class)
|
||||
static class TestConfiguration {
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.opentelemetry.testcontainers;
|
||||
|
||||
import org.testcontainers.grafana.LgtmStackContainer;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.opentelemetry.testcontainers;
|
||||
|
||||
import org.testcontainers.containers.Container;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support for Testcontainers OpenTelemetry logging service connections.
|
||||
*/
|
||||
package org.springframework.boot.opentelemetry.testcontainers;
|
||||
@@ -0,0 +1,4 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.opentelemetry.testcontainers.GrafanaOpenTelemetryLoggingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.opentelemetry.testcontainers.OpenTelemetryLoggingContainerConnectionDetailsFactory
|
||||
@@ -23,7 +23,7 @@ dependencies {
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-data-mongodb"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-docker-compose-all"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers-all"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tx"))
|
||||
dockerTestImplementation("com.zaxxer:HikariCP")
|
||||
@@ -134,7 +134,7 @@ dependencies {
|
||||
testImplementation(project(":spring-boot-project:spring-boot-gson"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-mustache"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-reactor"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-testcontainers-all"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-thymeleaf"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation("ch.qos.logback:logback-classic")
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
plugins {
|
||||
id "java-library"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
description = "Spring Boot Testcontainers Support All"
|
||||
|
||||
dependencies {
|
||||
api(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
api(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tx"))
|
||||
dockerTestImplementation(testFixtures(project(":spring-boot-project:spring-boot-testcontainers")))
|
||||
dockerTestImplementation("ch.qos.logback:logback-classic")
|
||||
dockerTestImplementation("io.micrometer:micrometer-registry-otlp")
|
||||
dockerTestImplementation("io.rest-assured:rest-assured")
|
||||
dockerTestImplementation("org.assertj:assertj-core")
|
||||
dockerTestImplementation("org.awaitility:awaitility")
|
||||
dockerTestImplementation("org.junit.jupiter:junit-jupiter")
|
||||
dockerTestImplementation("org.junit.platform:junit-platform-launcher")
|
||||
dockerTestImplementation("org.mockito:mockito-core")
|
||||
dockerTestImplementation("org.springframework:spring-core-test")
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure-all"))
|
||||
optional(project(":spring-boot-project:spring-boot-metrics"))
|
||||
optional(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
optional(project(":spring-boot-project:spring-boot-tracing"))
|
||||
optional(project(":spring-boot-project:spring-boot-tx"))
|
||||
optional(project(":spring-boot-project:spring-boot-zipkin"))
|
||||
optional("org.springframework:spring-test")
|
||||
optional("org.testcontainers:grafana")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
|
||||
testImplementation(testFixtures(project(":spring-boot-project:spring-boot-testcontainers")))
|
||||
testImplementation("org.springframework:spring-jdbc")
|
||||
testImplementation("org.testcontainers:junit-jupiter")
|
||||
}
|
||||
|
||||
javadoc.enabled = false
|
||||
|
||||
dockerTest {
|
||||
jvmArgs += "--add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
</configuration>
|
||||
@@ -1 +0,0 @@
|
||||
spring.test.context.cache.maxSize=1
|
||||
@@ -1,8 +0,0 @@
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.GrafanaOpenTelemetryLoggingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.GrafanaOpenTelemetryMetricsContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.OpenTelemetryLoggingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.OpenTelemetryMetricsContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.testcontainers.service.connection.otlp.OpenTelemetryTracingContainerConnectionDetailsFactory
|
||||
@@ -3,6 +3,7 @@ plugins {
|
||||
id "org.springframework.boot.auto-configuration"
|
||||
id "org.springframework.boot.configuration-properties"
|
||||
id "org.springframework.boot.deployed"
|
||||
id "org.springframework.boot.docker-test"
|
||||
id "org.springframework.boot.optional-dependencies"
|
||||
}
|
||||
|
||||
@@ -18,6 +19,7 @@ dependencies {
|
||||
optional(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-autoconfigure"))
|
||||
optional(project(":spring-boot-project:spring-boot-metrics"))
|
||||
optional(project(":spring-boot-project:spring-boot-testcontainers"))
|
||||
optional("io.micrometer:micrometer-core")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-brave")
|
||||
optional("io.micrometer:micrometer-tracing-bridge-otel")
|
||||
@@ -27,6 +29,10 @@ dependencies {
|
||||
optional("io.zipkin.reporter2:zipkin-reporter-brave")
|
||||
optional("org.aspectj:aspectjweaver")
|
||||
optional("org.junit.platform:junit-platform-launcher")
|
||||
optional("org.testcontainers:grafana")
|
||||
|
||||
dockerTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support-docker"))
|
||||
dockerTestImplementation("org.testcontainers:junit-jupiter")
|
||||
|
||||
testImplementation(project(":spring-boot-project:spring-boot-opentelemetry"))
|
||||
testImplementation(project(":spring-boot-project:spring-boot-test"))
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.tracing.testcontainers.otlp;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.grafana.LgtmStackContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.tracing.testcontainers.otlp;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.tracing.testcontainers.otlp;
|
||||
|
||||
import org.testcontainers.grafana.LgtmStackContainer;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.boot.testcontainers.service.connection.otlp;
|
||||
package org.springframework.boot.tracing.testcontainers.otlp;
|
||||
|
||||
import org.testcontainers.containers.Container;
|
||||
import org.testcontainers.containers.GenericContainer;
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Support for Testcontainers OpenTelemetry tracing service connections.
|
||||
*/
|
||||
package org.springframework.boot.tracing.testcontainers.otlp;
|
||||
@@ -1,7 +1,13 @@
|
||||
# Environment Post Processors
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||
org.springframework.boot.tracing.autoconfigure.LogCorrelationEnvironmentPostProcessor
|
||||
# Connection Details Factories
|
||||
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
|
||||
org.springframework.boot.tracing.testcontainers.otlp.GrafanaOpenTelemetryTracingContainerConnectionDetailsFactory,\
|
||||
org.springframework.boot.tracing.testcontainers.otlp.OpenTelemetryTracingContainerConnectionDetailsFactory
|
||||
|
||||
# Application Listeners
|
||||
org.springframework.context.ApplicationListener=\
|
||||
org.springframework.boot.tracing.autoconfigure.OpenTelemetryEventPublisherBeansApplicationListener
|
||||
|
||||
# Environment Post Processors
|
||||
org.springframework.boot.env.EnvironmentPostProcessor=\
|
||||
org.springframework.boot.tracing.autoconfigure.LogCorrelationEnvironmentPostProcessor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user