Commit Graph

274 Commits (222ed44bd4824a0b8020fcbc7e5b0429a6cf7a95)

Author SHA1 Message Date
Madhura Bhave d745b69630 Replace usages of EnvironmentTestUtils 8 years ago
Andy Wilkinson d5438c299c Polish "Use try-with-resources to close resources automatically"
- Apply code formatting
- Use try-with-resources in many other places that were missed in the
  pull request

Closes gh-8045
8 years ago
Johnny Lim 53e5d67cde Polish
Closes gh-9103
8 years ago
Stephane Nicoll 5247fa323b Harmonize reactive auto-configuration class names
Closes gh-9086
8 years ago
Phillip Webb 06558675bb Polish 8 years ago
Madhura Bhave c2e5fd031a Replace usage of WebMvcConfigurerAdapter
Closes gh-8964
8 years ago
Spring Buildmaster 9768b0a8c2 Next Development Version 8 years ago
Phillip Webb 9981ae6874 Rename WebFluxAnnotationAutoConfiguration
Rename WebFluxAnnotationAutoConfiguration to WebFluxAutoConfiguration
to better align with Spring MVC.
8 years ago
Phillip Webb 94209e2883 Merge branch '1.5.x' 8 years ago
Phillip Webb 8eb79b3c0f Polish 8 years ago
Phillip Webb 383640d5ec Merge branch '1.5.x' 8 years ago
Phillip Webb f46d799f31 Polish 8 years ago
Madhura Bhave ed072abaef Merge branch '1.5.x' 8 years ago
Madhura Bhave 9e2d54feae Support json view with JacksonTester
Closes gh-8672
8 years ago
Phillip Webb 700f0ea93c Fix WebClientTest calls
Update calls to WebClientTest following upstream changes.
8 years ago
Stephane Nicoll 04ee374e7f Polish "Add slice test annotation for LDAP"
Closes gh-8536
8 years ago
Eddú Meléndez 2830bef95c Add slice test annotation for LDAP
This commit adds new annotation `@DataLdapTest` which provides test
infrastructure for LDAP. By default, embedded ldap server is initialized
if available.

See gh-8536
8 years ago
dreis f3bbbc4530 Use JDK hashCode() variants for primitives
See gh-8768
8 years ago
Stephane Nicoll 12170f53e2 Restore DataMongoTestReactiveIntegrationTests
Closes gh-8885
8 years ago
Phillip Webb d21a5076fe Upgrade to Reactor BOM Bismuth SNAPSHOT
See gh-8884
8 years ago
Johnny Lim 0cd1285aa4 Polish
Closes gh-8879
8 years ago
Stephane Nicoll 5b92a0278b Merge branch '1.5.x' 8 years ago
Stephane Nicoll 934d33685a Polish
See gh-8879
8 years ago
Phillip Webb 2de7e9c310 Merge branch '1.5.x' 8 years ago
Phillip Webb ad38776de3 Polish 8 years ago
Stephane Nicoll b08016f15a Polish "Add @DataNeo4jTest" contribution
Closes gh-8618
8 years ago
Eddú Meléndez b6feb47574 Add @DataNeo4jTest
This commit adds test infrastructure for Neo4j repositories through
`@DataNeo4jTest`.

See gh-8618
8 years ago
Andy Wilkinson 28a5ffcce6 Fix DataJpaTestIntegrationTests
Closes gh-7612
8 years ago
Andy Wilkinson 2fd51dd8a1 Upgrade to Spring REST Docs 1.2.0.RC1
Closes gh-8716
8 years ago
Madhura Bhave 9bacca7aa0 Merge branch '1.5.x' 8 years ago
Madhura Bhave f73714bdcc Do not filter HttpMessageConverters in WebMvcTest
Closes gh-8617
8 years ago
Madhura Bhave 356b78b77f Stop autoconfiguration from being scanned in tests
These tests used to pass even without explicitly adding the autoconfigure
annotation. Moving them to a subpackage prevents scanning of the
autoconfiguration by component scanning.

Closes gh-8645
8 years ago
Madhura Bhave 7d90bbe839 Fix typo 8 years ago
Phillip Webb b76ca0bf8f Restructure web auto-configuration
Restructure `org.springframework.boot.autoconfigure.web` to better align
with the new package structure in `spring-boot`.

Auto-configuration is now split into client, servlet and reactive
sub-packages. In addition a new `http` package now handles common
HTTP concerns.

Fixes gh-8616
8 years ago
Phillip Webb d8f827d224 Cleanup and format code 8 years ago
Phillip Webb 425dbc3e52 Update copyright header for edited files 8 years ago
Phillip Webb 2a592103f0 Polish formatting 8 years ago
Spring Buildmaster d23fa24340 Next Development Version 8 years ago
Vedran Pavic 1c789f1a8d Remove dependency management for `hibernate-entitymanager`
Closes gh-8433
8 years ago
Phillip Webb a4bcd20b64 Merge branch '1.5.x' 8 years ago
Phillip Webb ca1540cefe Update header copyright for changed files 8 years ago
Stephane Nicoll c5595f296c Add support for Mock test with WebFlux
This commit add mock support for WebFlux with an infrastructure similar
to what `WebMvcTest` provides. `@WebFluxTest` can be used to test
controllers with a narrowed classpath that is relevant to WebFlux. Also,
`@SpringBootTest` now starts WebFlux in "mock" mode by default and
`@AutoConfigureWebTestClient` can be used to inject a `WebTestClient`
connected to the `ApplicationContext`.

To make that happen, a `ReactiveWebApplicationContext` interface has been
introduced to mirror what `WebApplicationContext` currently does. Things
are still a bit volatile at this point and that infra may move to Spring
Framework at some point.

Closes gh-8401
8 years ago
Andy Wilkinson 9cbb857111 Add explicit dependency on Gson
It used to be pulled in transitively by selenium-api but that's no
longer that case.

See gh-8381
8 years ago
Andy Wilkinson 923393d5af Merge branch '1.5.x' 8 years ago
Andy Wilkinson 98a2ae3b91 Merge branch '1.4.x' into 1.5.x 8 years ago
Andy Wilkinson 1abd91dc23 Start building against Spring Framework 4.3.7 snapshots
See gh-8248
8 years ago
Stephane Nicoll ce6372c46f Add support of reactive repositories with `@DataMongoTest`
Closes gh-8280
8 years ago
Andy Wilkinson df08863641 Make ServletRegistrationBean and FilterRegistration bean generic
Closes gh-7666
8 years ago
Stephane Nicoll f41801ee8c Narrow down ConditionalOnWebApplication
Use the new `type` attribute of `@ConditionalOnWebApplication` for the
configurations that have a hard dependency on the Servlet/MVC API.

See gh-8118
8 years ago
Stephane Nicoll 6af6e8e31b Remove auto-configuration for ServerProperties
This commit removes `ServerProperties` and `ManagementServerProperties`
auto-configurations. Those properties objects are now created using
`@EnableConfigurationProperties` only.

Closes gh-8108
8 years ago
Stephane Nicoll cfdc75d384 Merge branch '1.5.x' 8 years ago
Johnny Lim 0adab8a2be Use logical 'and' instead of bitwise 'and'
Closes gh-8198
8 years ago
Stephane Nicoll 5c663a9ece Merge branch '1.5.x' 8 years ago
Johnny Lim 846994e498 Polish
Closes gh-8148
8 years ago
Brian Clozel 1709a3ad96 Adapt to Assert.instanceOf changes
Since SPR-15196, the behavior of `Assert` methods changed and some were
deprecated. This commit adapts to the new error mechanism implemented in
`Assert.instanceOf`.

Fixes gh-8140
8 years ago
Andy Wilkinson 95f659f4f9 Add new WebApplicationType enum to pave the way for Web Flux support
Closes gh-8077
8 years ago
Spring Buildmaster 5c12500366 Next Development Version 8 years ago
Spring Buildmaster a2696bf873 Next Development Version 8 years ago
Phillip Webb 8747e039ee Merge branch '1.5.x' 8 years ago
Phillip Webb fa6a138598 Refine ImportsContextCustomizer cache logic
Update `ImportsContextCustomizer` so that whenever possible a more
specific cache key is used.

Prior to this commit the customizer would generate a key based on *all*
annotations on the test class. This has repeatedly caused issues where
test classes that should have the same cache key did not due to
unrelated annotations.

A new `DeterminableImports` interface has been added that can be
implemented by `ImportSelector` and `ImportBeanDefinitionRegistrar`
implementations that are able to determine their imports early. The
existing `ImportAutoConfigurationImportSelector` and
`AutoConfigurationPackages` classes have been retrofitted with
this interface.

Fixes gh-7953
8 years ago
Phillip Webb aaf118c544 Fix TypeExcludeFiltersContextCustomer key
Update `TypeExcludeFiltersContextCustomer` to use filter instances
as part of the key, rather than class references. In order to be used
in tests, `TypeExcludeFilter` implementations must now implement valid
`hashCode` and `equals` methods.

Fixes gh-8125
8 years ago
Eddú Meléndez 3d52c86a21 Annotate interfaces with @FunctionaInterface
Closes gh-6857
8 years ago
Spring Buildmaster ed1ce140c0 Next Development Version 8 years ago
Phillip Webb 8ffaa54e74 Merge branch '1.5.x' 8 years ago
Phillip Webb 2c89d9918f Relocate AutoConfigurations from root package
Move PropertyPlaceholder and MessageSource auto-configuration from the
root package to the `context` subpackage.

Fixes gh-8071
8 years ago
Phillip Webb 3893383cbe Merge branch '1.5.x' 8 years ago
Phillip Webb 5703fb1515 Polish 8 years ago
Stephane Nicoll 4fe04178b7 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 915c959a28 Polish contribution
Closes gh-7600
8 years ago
Michael J. Simons 8648520876 Add slide test annotation for MongoDB
This commits adds a slice test infrastructure for MongoDB, similar to
what `@DataJpaTest` does with JPA.

By default, an embedded Mongod process is used if available.

See gh-7600
8 years ago
Phillip Webb 89f7ec054f Merge branch '1.5.x' 8 years ago
Phillip Webb f3cd0ad22c Polish 8 years ago
Phillip Webb 655fa59db0 Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb b05bdbfe4f Polish 8 years ago
Stephane Nicoll 03afa0b7b9 Merge branch '1.5.x' 8 years ago
Stephane Nicoll e44b595c0d Fix merge issue 8 years ago
Stephane Nicoll b29e296383 Merge branch '1.5.x' 8 years ago
Stephane Nicoll d2299555d2 Merge branch '1.4.x' into 1.5.x 8 years ago
Stephane Nicoll ffa6d6d6e0 Improve error message used in TestDatabaseAutoConfiguration
By default, `@DataJpaTest` (and `@AutoConfigureTestDatabase`) attempt to
replace any existing `DataSource` by an embedded one. Previously, if
there is was no embedded database on the classpath, the exception message
did not provide that context in the error message.

This commit clarifies the error message to conduct
`TestDatabaseAutoConfiguration` (that is replacing the existing
`DataSource`).

Closes gh-7797
8 years ago
Phillip Webb 5502fa2936 Merge branch '1.5.x' 8 years ago
Phillip Webb 0a6456a748 Always use `prefix` config annotation attribute
Update use of `@ConfigurationProperties` to prefer the more explicit
`prefix` attribute, rather than `value`.

See gh-7579
8 years ago
Stephane Nicoll dbb9a1bd20 Merge branch '1.5.x' 8 years ago
Stephane Nicoll 7a75fb0f38 Fix test-specific configuration metadata
Most of the config keys defined by the `spring-boot-test-autoconfigure`
module can't be overridden because they are mapped with `@PropertyMapping`
on an annotation. It is confusing that such keys are exposed in content
assistance as using them will have no effect.

This commit removes the annotation processor from the build so that the
`@ConfigurationProperties` beans aren't processed anymore. Instead, manual
metadata is written for the two only keys that are effectively used in
regular configuration.

As a result, the `additional-spring-configuration-metadata` file has been
renamed to `spring-configuration-metadata` since nothing is processing it
anymore.

Closes gh-7887
8 years ago
Phillip Webb 125d9d6181 Merge branch '1.5.x' 8 years ago
Phillip Webb e015e13b4d Include `ErrorAttributes` in @WebMvcTest
Import the additional auto-configuration classes required for
`ErrorAttributes` and change the filter so that it's no longer
hidden.

Fixes gh-7867
8 years ago
Stephane Nicoll 506f6497c0 Merge branch '1.5.x' 8 years ago
Johnny Lim f915ae197a Polish 8 years ago
Phillip Webb 86a42e4e44 Merge branch '1.5.x' 8 years ago
Phillip Webb 54aeff47a2 Add exclude support to @ImportAutoConfiguration
Update `@ImportAutoConfiguration` with support for an exclude attribute
that works in a similar way to `@EnableAutoConfiguration`.

Also update existing `@Test...` annotation with exclude attribute
aliases.

Fixes gh-6809
8 years ago
Phillip Webb 8b69856fc9 Polish 8 years ago
Spring Buildmaster 9057f9ae1f Next development version 8 years ago
Phillip Webb 1f417997f3 Merge branch '1.5.x' 8 years ago
Phillip Webb 6121208cbb Polish formatting 8 years ago
Phillip Webb 4b9cba351b Merge branch '1.4.x' into 1.5.x 8 years ago
Phillip Webb bd74c3d327 Polish formatting 8 years ago
Stephane Nicoll e3496614be Merge branch '1.5.x' 8 years ago
Stephane Nicoll 21b815aabd Polish contribution
Closes gh-7560
8 years ago
Eddú Meléndez 5a7624df7c Add support for property spring.test.database.replace
Closes gh-7229
8 years ago
Stephane Nicoll 9056e9bd7e Merge branch '1.5.x' 8 years ago
Stephane Nicoll d8d5950e99 Enable validation in `AutoConfigureWebMvc`
Closes gh-7582
8 years ago