Add DataCouchbaseTest annotation
See gh-29912
This commit is contained in:
committed by
Andy Wilkinson
parent
8015fb0608
commit
36e52758a7
@@ -339,6 +339,7 @@ boot-features-testing-spring-boot-applications-testing-autoconfigured-json-tests
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-mvc-tests=features.testing.spring-boot-applications.spring-mvc-tests
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-webflux-tests=features.testing.spring-boot-applications.spring-webflux-tests
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-cassandra-test=features.testing.spring-boot-applications.autoconfigured-spring-data-cassandra
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-couchbase-test=features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-jpa-test=features.testing.spring-boot-applications.autoconfigured-spring-data-jpa
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-jdbc-test=features.testing.spring-boot-applications.autoconfigured-jdbc
|
||||
boot-features-testing-spring-boot-applications-testing-autoconfigured-data-jdbc-test=features.testing.spring-boot-applications.autoconfigured-spring-data-jdbc
|
||||
|
||||
@@ -472,6 +472,22 @@ include::code:MyDataCassandraTests[]
|
||||
|
||||
|
||||
|
||||
[[features.testing.spring-boot-applications.autoconfigured-spring-data-couchbase]]
|
||||
==== Auto-configured Data Couchbase Tests
|
||||
You can use `@DataCouchbaseTest` to test Couchbase applications.
|
||||
By default, it configures a `CouchbaseTemplate`, scans for `@Document` classes, and configures Spring Data Couchbase repositories.
|
||||
Regular `@Component` and `@ConfigurationProperties` beans are not scanned when the `@DataCouchbaseTest` annotation is used.
|
||||
`@EnableConfigurationProperties` can be used to include `@ConfigurationProperties` beans.
|
||||
(For more about using Couchbase with Spring Boot, see "<<data#data.nosql.couchbase>>", earlier in this chapter.)
|
||||
|
||||
TIP: A list of the auto-configuration settings that are enabled by `@DataCouchbaseTest` can be <<test-auto-configuration#appendix.test-auto-configuration,found in the appendix>>.
|
||||
|
||||
The following example shows a typical setup for using Couchbase tests in Spring Boot:
|
||||
|
||||
include::code:MyDataCouchbaseTests[]
|
||||
|
||||
|
||||
|
||||
[[features.testing.spring-boot-applications.autoconfigured-spring-data-elasticsearch]]
|
||||
==== Auto-configured Data Elasticsearch Tests
|
||||
You can use `@DataElasticsearchTest` to test Elasticsearch applications.
|
||||
|
||||
Reference in New Issue
Block a user