Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
9e901b6e
Commit
9e901b6e
authored
Nov 10, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to Testcontainers 1.15.0
Closes gh-24103
parent
23ad2b41
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
38 additions
and
42 deletions
+38
-42
CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java
...figurationWithPasswordAuthenticationIntegrationTests.java
+1
-1
CouchbaseAutoConfigurationIntegrationTests.java
...couchbase/CouchbaseAutoConfigurationIntegrationTests.java
+1
-1
CassandraDataAutoConfigurationIntegrationTests.java
...andra/CassandraDataAutoConfigurationIntegrationTests.java
+1
-1
ElasticsearchRepositoriesAutoConfigurationTests.java
...arch/ElasticsearchRepositoriesAutoConfigurationTests.java
+2
-3
ReactiveElasticsearchRepositoriesAutoConfigurationTests.java
...ctiveElasticsearchRepositoriesAutoConfigurationTests.java
+2
-3
ReactiveElasticsearchRestClientAutoConfigurationTests.java
...eactiveElasticsearchRestClientAutoConfigurationTests.java
+2
-3
ElasticsearchRestClientAutoConfigurationTests.java
...search/ElasticsearchRestClientAutoConfigurationTests.java
+2
-3
SessionAutoConfigurationMongoTests.java
...configure/session/SessionAutoConfigurationMongoTests.java
+2
-2
build.gradle
spring-boot-project/spring-boot-parent/build.gradle
+1
-1
DataMongoTestIntegrationTests.java
...toconfigure/data/mongo/DataMongoTestIntegrationTests.java
+2
-2
DataMongoTestReactiveIntegrationTests.java
...ure/data/mongo/DataMongoTestReactiveIntegrationTests.java
+2
-2
DataMongoTestWithIncludeFilterIntegrationTests.java
...mongo/DataMongoTestWithIncludeFilterIntegrationTests.java
+2
-2
TransactionalDataMongoTestIntegrationTests.java
...ata/mongo/TransactionalDataMongoTestIntegrationTests.java
+2
-2
DataNeo4jTestIntegrationTests.java
...toconfigure/data/neo4j/DataNeo4jTestIntegrationTests.java
+2
-2
DataNeo4jTestPropertiesIntegrationTests.java
...e/data/neo4j/DataNeo4jTestPropertiesIntegrationTests.java
+2
-2
DataNeo4jTestWithIncludeFilterIntegrationTests.java
...neo4j/DataNeo4jTestWithIncludeFilterIntegrationTests.java
+2
-2
DockerImageNames.java
...ork/boot/testsupport/testcontainers/DockerImageNames.java
+7
-7
RedisContainer.java
...ework/boot/testsupport/testcontainers/RedisContainer.java
+1
-1
CityRepositoryTests.java
...c/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
+1
-1
CityRepositoryTests.java
...c/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
+1
-1
No files found.
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests.java
View file @
9e901b6e
...
...
@@ -85,7 +85,7 @@ class CassandraAutoConfigurationWithPasswordAuthenticationIntegrationTests {
extends
CassandraContainer
<
PasswordAuthenticatorCassandraContainer
>
{
PasswordAuthenticatorCassandraContainer
()
{
super
(
DockerImageNames
.
cassandra
()
.
toString
()
);
super
(
DockerImageNames
.
cassandra
());
}
@Override
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/couchbase/CouchbaseAutoConfigurationIntegrationTests.java
View file @
9e901b6e
...
...
@@ -47,7 +47,7 @@ class CouchbaseAutoConfigurationIntegrationTests {
private
static
final
String
BUCKET_NAME
=
"cbbucket"
;
@Container
static
final
CouchbaseContainer
couchbase
=
new
CouchbaseContainer
(
DockerImageNames
.
couchbase
()
.
toString
()
)
static
final
CouchbaseContainer
couchbase
=
new
CouchbaseContainer
(
DockerImageNames
.
couchbase
())
.
withCredentials
(
"spring"
,
"password"
).
withStartupAttempts
(
5
).
withStartupTimeout
(
Duration
.
ofMinutes
(
10
))
.
withBucket
(
new
BucketDefinition
(
BUCKET_NAME
).
withPrimaryIndex
(
false
));
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/cassandra/CassandraDataAutoConfigurationIntegrationTests.java
View file @
9e901b6e
...
...
@@ -49,7 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
class
CassandraDataAutoConfigurationIntegrationTests
{
@Container
static
final
CassandraContainer
<?>
cassandra
=
new
CassandraContainer
<>(
DockerImageNames
.
cassandra
()
.
toString
()
)
static
final
CassandraContainer
<?>
cassandra
=
new
CassandraContainer
<>(
DockerImageNames
.
cassandra
())
.
withStartupAttempts
(
5
).
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
private
final
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java
View file @
9e901b6e
...
...
@@ -49,9 +49,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
ElasticsearchRepositoriesAutoConfigurationTests
{
@Container
static
final
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
().
toString
()).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
final
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
())
.
withStartupAttempts
(
5
).
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
private
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
ElasticsearchRestClientAutoConfiguration
.
class
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java
View file @
9e901b6e
...
...
@@ -48,9 +48,8 @@ import static org.assertj.core.api.Assertions.assertThat;
public
class
ReactiveElasticsearchRepositoriesAutoConfigurationTests
{
@Container
static
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
().
toString
()).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
())
.
withStartupAttempts
(
5
).
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
private
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
ReactiveElasticsearchRestClientAutoConfiguration
.
class
,
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationTests.java
View file @
9e901b6e
...
...
@@ -48,9 +48,8 @@ import static org.mockito.Mockito.mock;
public
class
ReactiveElasticsearchRestClientAutoConfigurationTests
{
@Container
static
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
().
toString
()).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
())
.
withStartupAttempts
(
5
).
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
private
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
ReactiveElasticsearchRestClientAutoConfiguration
.
class
));
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientAutoConfigurationTests.java
View file @
9e901b6e
...
...
@@ -60,9 +60,8 @@ import static org.mockito.Mockito.mock;
class
ElasticsearchRestClientAutoConfigurationTests
{
@Container
static
final
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
().
toString
()).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
final
ElasticsearchContainer
elasticsearch
=
new
ElasticsearchContainer
(
DockerImageNames
.
elasticsearch
())
.
withStartupAttempts
(
5
).
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
private
final
ApplicationContextRunner
contextRunner
=
new
ApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
ElasticsearchRestClientAutoConfiguration
.
class
));
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/session/SessionAutoConfigurationMongoTests.java
View file @
9e901b6e
...
...
@@ -47,8 +47,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
SessionAutoConfigurationMongoTests
extends
AbstractSessionAutoConfigurationTests
{
@Container
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
.
toString
()
)
.
withStartup
Attempts
(
5
).
withStartup
Timeout
(
Duration
.
ofMinutes
(
5
));
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
5
));
private
final
WebApplicationContextRunner
contextRunner
=
new
WebApplicationContextRunner
()
.
withConfiguration
(
AutoConfigurations
.
of
(
MongoAutoConfiguration
.
class
,
MongoDataAutoConfiguration
.
class
,
...
...
spring-boot-project/spring-boot-parent/build.gradle
View file @
9e901b6e
...
...
@@ -161,7 +161,7 @@ bom {
]
}
}
library
(
"Testcontainers"
,
"1.1
4.3
"
)
{
library
(
"Testcontainers"
,
"1.1
5.0
"
)
{
group
(
"org.testcontainers"
)
{
imports
=
[
"testcontainers-bom"
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestIntegrationTests.java
View file @
9e901b6e
...
...
@@ -44,8 +44,8 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
class
DataMongoTestIntegrationTests
{
@Container
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
.
toString
()
)
.
withStartup
Attempts
(
5
).
withStartup
Timeout
(
Duration
.
ofMinutes
(
5
));
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
5
));
@Autowired
private
MongoTemplate
mongoTemplate
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestReactiveIntegrationTests.java
View file @
9e901b6e
...
...
@@ -41,8 +41,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
DataMongoTestReactiveIntegrationTests
{
@Container
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
.
toString
()
)
.
withStartup
Attempts
(
5
).
withStartup
Timeout
(
Duration
.
ofMinutes
(
5
));
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
5
));
@Autowired
private
ReactiveMongoTemplate
mongoTemplate
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/DataMongoTestWithIncludeFilterIntegrationTests.java
View file @
9e901b6e
...
...
@@ -42,8 +42,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
DataMongoTestWithIncludeFilterIntegrationTests
{
@Container
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
.
toString
()
)
.
withStartup
Attempts
(
5
).
withStartup
Timeout
(
Duration
.
ofMinutes
(
5
));
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
5
));
@Autowired
private
ExampleService
service
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/mongo/TransactionalDataMongoTestIntegrationTests.java
View file @
9e901b6e
...
...
@@ -48,8 +48,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
TransactionalDataMongoTestIntegrationTests
{
@Container
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
.
toString
()
)
.
withStartup
Attempts
(
5
).
withStartup
Timeout
(
Duration
.
ofMinutes
(
5
));
static
final
MongoDBContainer
mongoDB
=
new
MongoDBContainer
(
DockerImageNames
.
mongo
()
).
withStartupAttempts
(
5
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
5
));
@Autowired
private
ExampleRepository
exampleRepository
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestIntegrationTests.java
View file @
9e901b6e
...
...
@@ -46,8 +46,8 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
class
DataNeo4jTestIntegrationTests
{
@Container
static
final
Neo4jContainer
<?>
neo4j
=
new
Neo4jContainer
<>(
DockerImageNames
.
neo4j
()
.
toString
()
)
.
with
outAuthentication
().
with
StartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
final
Neo4jContainer
<?>
neo4j
=
new
Neo4jContainer
<>(
DockerImageNames
.
neo4j
()
).
withoutAuthentication
(
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
@Autowired
private
Session
session
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestPropertiesIntegrationTests.java
View file @
9e901b6e
...
...
@@ -42,8 +42,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
DataNeo4jTestPropertiesIntegrationTests
{
@Container
static
final
Neo4jContainer
<?>
neo4j
=
new
Neo4jContainer
<>(
DockerImageNames
.
neo4j
()
.
toString
()
)
.
with
outAuthentication
().
with
StartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
final
Neo4jContainer
<?>
neo4j
=
new
Neo4jContainer
<>(
DockerImageNames
.
neo4j
()
).
withoutAuthentication
(
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
@Autowired
private
Environment
environment
;
...
...
spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/neo4j/DataNeo4jTestWithIncludeFilterIntegrationTests.java
View file @
9e901b6e
...
...
@@ -43,8 +43,8 @@ import static org.assertj.core.api.Assertions.assertThat;
class
DataNeo4jTestWithIncludeFilterIntegrationTests
{
@Container
static
final
Neo4jContainer
<?>
neo4j
=
new
Neo4jContainer
<>(
DockerImageNames
.
neo4j
()
.
toString
()
)
.
with
outAuthentication
().
with
StartupTimeout
(
Duration
.
ofMinutes
(
10
));
static
final
Neo4jContainer
<?>
neo4j
=
new
Neo4jContainer
<>(
DockerImageNames
.
neo4j
()
).
withoutAuthentication
(
)
.
withStartupTimeout
(
Duration
.
ofMinutes
(
10
));
@Autowired
private
ExampleService
service
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/DockerImageNames.java
View file @
9e901b6e
...
...
@@ -46,7 +46,7 @@ public final class DockerImageNames {
* @return a docker image name for running cassandra
*/
public
static
DockerImageName
cassandra
()
{
return
new
DockerImageName
(
"cassandra"
,
CASSANDRA_VERSION
);
return
DockerImageName
.
parse
(
"cassandra"
).
withTag
(
CASSANDRA_VERSION
);
}
/**
...
...
@@ -54,7 +54,7 @@ public final class DockerImageNames {
* @return a docker image name for running cassandra
*/
public
static
DockerImageName
couchbase
()
{
return
new
DockerImageName
(
"couchbase/server"
,
COUCHBASE_VERSION
);
return
DockerImageName
.
parse
(
"couchbase/server"
).
withTag
(
COUCHBASE_VERSION
);
}
/**
...
...
@@ -64,7 +64,7 @@ public final class DockerImageNames {
*/
public
static
DockerImageName
elasticsearch
()
{
String
version
=
org
.
elasticsearch
.
Version
.
CURRENT
.
toString
();
return
new
DockerImageName
(
"docker.elastic.co/elasticsearch/elasticsearch"
,
version
);
return
DockerImageName
.
parse
(
"docker.elastic.co/elasticsearch/elasticsearch"
).
withTag
(
version
);
}
/**
...
...
@@ -72,7 +72,7 @@ public final class DockerImageNames {
* @return a docker image name for running mongo
*/
public
static
DockerImageName
mongo
()
{
return
new
DockerImageName
(
"mongo"
,
MONGO_VERSION
);
return
DockerImageName
.
parse
(
"mongo"
).
withTag
(
MONGO_VERSION
);
}
/**
...
...
@@ -80,7 +80,7 @@ public final class DockerImageNames {
* @return a docker image name for running neo4j
*/
public
static
DockerImageName
neo4j
()
{
return
new
DockerImageName
(
"neo4j"
,
NEO4J_VERSION
);
return
DockerImageName
.
parse
(
"neo4j"
).
withTag
(
NEO4J_VERSION
);
}
/**
...
...
@@ -88,7 +88,7 @@ public final class DockerImageNames {
* @return a docker image name for running postgresql
*/
public
static
DockerImageName
postgresql
()
{
return
new
DockerImageName
(
"postgres"
,
POSTGRESQL_VERSION
);
return
DockerImageName
.
parse
(
"postgres"
).
withTag
(
POSTGRESQL_VERSION
);
}
/**
...
...
@@ -96,7 +96,7 @@ public final class DockerImageNames {
* @return a docker image name for running redis
*/
public
static
DockerImageName
redis
()
{
return
new
DockerImageName
(
"redis"
,
REDIS_VERSION
);
return
DockerImageName
.
parse
(
"redis"
).
withTag
(
REDIS_VERSION
);
}
}
spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/testcontainers/RedisContainer.java
View file @
9e901b6e
...
...
@@ -28,7 +28,7 @@ import org.testcontainers.containers.GenericContainer;
public
class
RedisContainer
extends
GenericContainer
<
RedisContainer
>
{
public
RedisContainer
()
{
super
(
DockerImageNames
.
redis
()
.
toString
()
);
super
(
DockerImageNames
.
redis
());
addExposedPorts
(
6379
);
}
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-r2dbc-flyway/src/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
View file @
9e901b6e
...
...
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
class
CityRepositoryTests
{
@Container
static
PostgreSQLContainer
<?>
postgresql
=
new
PostgreSQLContainer
<>(
DockerImageNames
.
postgresql
()
.
toString
()
)
static
PostgreSQLContainer
<?>
postgresql
=
new
PostgreSQLContainer
<>(
DockerImageNames
.
postgresql
())
.
withDatabaseName
(
"test_flyway"
);
@DynamicPropertySource
...
...
spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-data-r2dbc-liquibase/src/test/java/smoketest/data/r2dbc/CityRepositoryTests.java
View file @
9e901b6e
...
...
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
class
CityRepositoryTests
{
@Container
static
PostgreSQLContainer
<?>
postgresql
=
new
PostgreSQLContainer
<>(
DockerImageNames
.
postgresql
()
.
toString
()
)
static
PostgreSQLContainer
<?>
postgresql
=
new
PostgreSQLContainer
<>(
DockerImageNames
.
postgresql
())
.
withDatabaseName
(
"test_liquibase"
);
@DynamicPropertySource
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment