Fix Testcontainer Tests With No Docker Running
Disable the tests, if Docker is not available.
This commit is contained in:
committed by
Artem Bilan
parent
87aa29cd02
commit
41741f2e68
11
build.gradle
11
build.gradle
@@ -70,7 +70,7 @@ ext {
|
||||
springDataVersion = '2022.0.0'
|
||||
springVersion = project.hasProperty('springVersion') ? project.springVersion : '6.0.0'
|
||||
springRetryVersion = '2.0.0'
|
||||
testContainersVersion = '1.17.6'
|
||||
testcontainersVersion = '1.17.6'
|
||||
zstdJniVersion = '1.5.0-2'
|
||||
|
||||
javaProjects = subprojects - project(':spring-amqp-bom')
|
||||
@@ -104,6 +104,7 @@ allprojects {
|
||||
mavenBom "org.springframework.data:spring-data-bom:$springDataVersion"
|
||||
mavenBom "io.micrometer:micrometer-bom:$micrometerVersion"
|
||||
mavenBom "io.micrometer:micrometer-tracing-bom:$micrometerTracingVersion"
|
||||
mavenBom "org.testcontainers:testcontainers-bom:$testcontainersVersion"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -443,7 +444,8 @@ project('spring-rabbit') {
|
||||
testImplementation 'io.micrometer:micrometer-tracing-bridge-brave'
|
||||
testImplementation 'io.micrometer:micrometer-tracing-test'
|
||||
testImplementation 'io.micrometer:micrometer-tracing-integration-test'
|
||||
testImplementation "org.testcontainers:rabbitmq:$testContainersVersion"
|
||||
testImplementation "org.testcontainers:rabbitmq"
|
||||
testImplementation 'org.testcontainers:junit-jupiter'
|
||||
testRuntimeOnly 'com.fasterxml.jackson.core:jackson-core'
|
||||
testRuntimeOnly 'com.fasterxml.jackson.core:jackson-databind'
|
||||
testRuntimeOnly 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml'
|
||||
@@ -480,7 +482,7 @@ project('spring-rabbit-stream') {
|
||||
testRuntimeOnly "org.xerial.snappy:snappy-java:$snappyVersion"
|
||||
testRuntimeOnly "org.lz4:lz4-java:$lz4Version"
|
||||
testRuntimeOnly "com.github.luben:zstd-jni:$zstdJniVersion"
|
||||
testImplementation "org.testcontainers:rabbitmq:$testContainersVersion"
|
||||
testImplementation "org.testcontainers:rabbitmq"
|
||||
testImplementation "org.apache.logging.log4j:log4j-slf4j-impl:$log4jVersion"
|
||||
testImplementation 'org.springframework:spring-webflux'
|
||||
}
|
||||
@@ -501,7 +503,8 @@ project('spring-rabbit-junit') {
|
||||
api 'org.springframework:spring-web'
|
||||
api 'org.junit.jupiter:junit-jupiter-api'
|
||||
api "org.assertj:assertj-core:$assertjVersion"
|
||||
optionalApi "org.testcontainers:rabbitmq:$testContainersVersion"
|
||||
optionalApi "org.testcontainers:rabbitmq"
|
||||
optionalApi "org.testcontainers:junit-jupiter"
|
||||
optionalApi "ch.qos.logback:logback-classic:$logbackVersion"
|
||||
optionalApi 'org.apache.logging.log4j:log4j-core'
|
||||
compileOnly 'org.apiguardian:apiguardian-api:1.0.0'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2021-2022 the original author or authors.
|
||||
* Copyright 2021-2023 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.
|
||||
@@ -19,6 +19,7 @@ package org.springframework.amqp.rabbit.junit;
|
||||
import java.time.Duration;
|
||||
|
||||
import org.testcontainers.containers.RabbitMQContainer;
|
||||
import org.testcontainers.junit.jupiter.Testcontainers;
|
||||
import org.testcontainers.utility.DockerImageName;
|
||||
|
||||
/**
|
||||
@@ -26,6 +27,7 @@ import org.testcontainers.utility.DockerImageName;
|
||||
* @since 2.4
|
||||
*
|
||||
*/
|
||||
@Testcontainers(disabledWithoutDocker = true)
|
||||
public abstract class AbstractTestContainerTests {
|
||||
|
||||
protected static final RabbitMQContainer RABBITMQ;
|
||||
|
||||
Reference in New Issue
Block a user