In Spring Boot we can test the the Spring Data JPA slice of an application by annotating the test case with @DataJpaTest
.
Is there an equivalent for testing an elasticsearch slice?
@DataJpaTest
looks like this. Maybe it is possible to create an @DataElasticsearchTest
annotation?
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
@BootstrapWith(SpringBootTestContextBootstrapper.class)
@OverrideAutoConfiguration(enabled = false)
@TypeExcludeFilters(DataJpaTypeExcludeFilter.class)
@Transactional
@AutoConfigureCache
@AutoConfigureDataJpa
@AutoConfigureTestDatabase
@AutoConfigureTestEntityManager
@ImportAutoConfiguration
public @interface DataJpaTest {
...
}