Commit Graph

33 Commits

Author SHA1 Message Date
Andy Wilkinson
654016af7f Move Docker-related test support into a separate module
See gh-41228
2024-06-26 19:47:35 +01:00
Andy Wilkinson
2890067e3a Update spring-boot-smoke-test-session-redis to use docker-test plugin
See gh-41228
2024-06-26 19:47:25 +01:00
Andy Wilkinson
491f34d25c Improve container test code
Replace `DockerImageNames` with a enum and relocate it from the
`testcontainers` to `container` package. The enum now also
becomes a common location that we can use to apply container
configuration such as timeouts.

Closes gh-41164

Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
2024-06-19 20:10:03 -07:00
Phillip Webb
bcbcafaab2 Polish "Use method references when possible in test code"
See gh-40974
2024-06-11 12:58:04 -07:00
Ahmed Ashour
207327d97c Use method references when possible in test code
See gh-40974
2024-06-11 12:58:00 -07:00
Phillip Webb
8427e813af Support import of idomatic testcontainer declaration classes
Add an `@ImportTestcontainers` annotation which can be used to import
idomatic testcontainer declaration classes.

Closes gh-35245
2023-05-03 00:28:36 -07:00
Phillip Webb
26566d4a30 Allow testcontainer beans to also contribute properties
Allow `Container` bean definitions to inject a `DynamicPropertyRegistry`
so that they can contribute environment properties.

Closes gh-35201
2023-05-03 00:27:13 -07:00
Phillip Webb
eabce52b93 Fix TestSampleSessionRedisApplication
Update the `@ServiceConnection` annotation to include the
service connection name.

See gh-35168
2023-05-01 22:13:49 -07:00
Stephane Nicoll
f874c027d8 Polish "Fix dependency management for spring-boot-testcontainers"
See gh-35119
2023-04-25 10:08:20 +02:00
Phillip Webb
5ac48f5f15 Add testcontainers service connection auto-configuration
Add auto-configuration for `Container` beans that are also
annotated with `@ServiceConnection`. This commit allow
testcontainers to be used at development time and a new section
has been added to the documentation to describe the feature.

Closes gh-35022
2023-04-17 00:49:43 -07:00
Phillip Webb
81a972af8d Refactor testcontainers service connections
Update restcontainers service connections support so that
technology specific `@ServiceConnector` annotations are not longer
required.

A single `@ServiceConnector` annotation can now be used to create
all `ConnectionDetail` beans.

Closes gh-35017
2023-04-17 00:45:39 -07:00
Phillip Webb
11dac5b5b7 Create dedicated spring-boot-testcontainers module
Create a dedicated testcontainers module containing the service
connectors code.

Closes gh-34757
2023-04-17 00:42:31 -07:00
Phillip Webb
00dc942e94 Migrate to Spring Security lambda config
Closes gh-35011
2023-04-14 17:39:48 -07:00
Phillip Webb
8d2f550f8c Merge branch '3.0.x' 2023-04-10 21:14:42 -07:00
Phillip Webb
3ba3558cff Merge branch '2.7.x' into 3.0.x 2023-04-10 21:14:34 -07:00
Phillip Webb
3e9a136143 Polish gradle formatting 2023-04-10 21:14:09 -07:00
Andy Wilkinson
95f45eab1f Create service connections from Testcontainers-managed containers
Building upon the auto-configuration support for service connections,
this commit adds support for deriving connection details from a
Testcontainers-managed container. Several service-specific
annotations have been introduced. These annotations can be used on a
container field to indicate that it is a source of the details for
a service connection.

See gh-34658

Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
2023-03-24 10:04:21 +00:00
Krzysztof Krason
6e46423983 Use diamond operators
See gh-33987
2023-01-26 20:35:08 -08:00
Phillip Webb
a2ac38e203 Update copyright year of changed files 2023-01-09 15:46:07 -08:00
Krzysztof Krason
cf6493f65c Simplify AssertJ assertions and also make them more readable
See gh-33653
2023-01-09 11:10:20 +01:00
Moritz Halbritter
08659baeba Polish away public modifier on tests 2022-12-16 16:08:44 +01:00
Johnny Lim
5067aab552 Polish
See gh-32840
2022-10-27 16:33:14 +02:00
Madhura Bhave
ce3c933f77 Adapt to Spring Security changes
Closes gh-32604
2022-10-19 11:46:27 -07:00
Andy Wilkinson
2977373505 Polish "Add property to configure Spring Session Redis repository type"
See gh-32205
2022-09-21 17:16:29 +01:00
Vedran Pavic
3093380e35 Add property to configure Spring Session Redis repository type
With Spring Session moving to RedisSessionRepository as the preferred
session repository, Spring Boot auto-configuration should make it
possible to easily switch back to the previous default
(RedisIndexedSessionRepository).

This commit introduces spring.session.redis.repository configuration
property that allows selecting the desired Redis-backed session
repository implementation.

See gh-32205
2022-09-21 17:13:58 +01:00
Madhura Bhave
0991bd3983 Harmonize data configuration
Any classes that rely on Spring Data being on the classpath
have been moved under a data package.

Certain configuration properties have also been updated to
accurately reflect whether Spring Data is required for the
auto-configuration to work.

Closes gh-11574
2022-08-05 13:32:25 -07:00
Andy Wilkinson
4bb5ba2bd0 Merge branch '2.7.x' 2022-05-26 18:26:52 +01:00
Andy Wilkinson
3d203d0215 Polish 2022-05-26 17:30:39 +01:00
Andy Wilkinson
061d86e037 Reinstate Session Redis smoke test
See gh-30673
2022-04-25 13:18:56 +01:00
Phillip Webb
c7374fd415 Update copyright year of changed files 2022-04-20 15:30:20 -07:00
Brian Clozel
21eab010de Disable Redis Session smoke test
This commit temporarily disables the Redis Session smoke test, as it
relies on the Session Actuator endpoint being present.

Since spring-projects/spring-session#1711, the default session
repository contributed is not of type `FindByIndexNameSessionRepository`
and thus cannot support the Session endpoint use case.

Until gh-30673 is resolved, this test is disabled.

See gh-30673
2022-04-15 16:44:23 +02:00
Madhura Bhave
42d21a8336 Remove parameterization of session smoke tests
There are dedicated smoke tests for Hazelcast, MongoDB and Redis
that run on CI.
This commit also polishes some of the other smoke tests related to
Spring Session
2021-10-19 16:47:53 -07:00
Madhura Bhave
2caa6cb227 Polish "Add smoke tests for Spring Session Redis/Mongo"
See gh-28362
2021-10-19 15:54:19 -07:00