|
|
|
@ -38,6 +38,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
|
|
|
|
import org.springframework.boot.testsupport.testcontainers.DockerImageNames;
|
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
import org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchTemplate;
|
|
|
|
|
import org.springframework.data.elasticsearch.config.EnableElasticsearchAuditing;
|
|
|
|
|
import org.springframework.data.elasticsearch.repository.config.EnableReactiveElasticsearchRepositories;
|
|
|
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
@ -48,6 +49,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
|
* @author Phillip Webb
|
|
|
|
|
* @author Andy Wilkinson
|
|
|
|
|
* @author Brian Clozel
|
|
|
|
|
* @author Scott Frederick
|
|
|
|
|
*/
|
|
|
|
|
@Testcontainers(disabledWithoutDocker = true)
|
|
|
|
|
class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
|
|
|
|
@ -87,6 +89,12 @@ class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
|
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(CityReactiveElasticsearchDbRepository.class));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Test
|
|
|
|
|
void testAuditingConfiguration() {
|
|
|
|
|
this.contextRunner.withUserConfiguration(AuditingConfiguration.class)
|
|
|
|
|
.run((context) -> assertThat(context).hasSingleBean(ReactiveElasticsearchTemplate.class));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false)
|
|
|
|
|
@TestAutoConfigurationPackage(City.class)
|
|
|
|
|
static class TestConfiguration {
|
|
|
|
@ -106,4 +114,12 @@ class ReactiveElasticsearchRepositoriesAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Configuration(proxyBeanMethods = false)
|
|
|
|
|
@TestAutoConfigurationPackage(ElasticsearchRepositoriesAutoConfigurationTests.class)
|
|
|
|
|
@EnableReactiveElasticsearchRepositories
|
|
|
|
|
@EnableElasticsearchAuditing
|
|
|
|
|
static class AuditingConfiguration {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|