Merge branch '2.1.x'
Closes gh-17213
This commit is contained in:
@@ -28,6 +28,7 @@ import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.test.autoconfigure.OverrideAutoConfiguration;
|
||||
import org.springframework.boot.test.autoconfigure.core.AutoConfigureCache;
|
||||
import org.springframework.boot.test.autoconfigure.filter.TypeExcludeFilters;
|
||||
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
|
||||
import org.springframework.context.annotation.ComponentScan.Filter;
|
||||
@@ -64,6 +65,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@OverrideAutoConfiguration(enabled = false)
|
||||
@TypeExcludeFilters(JooqTypeExcludeFilter.class)
|
||||
@Transactional
|
||||
@AutoConfigureCache
|
||||
@AutoConfigureJooq
|
||||
@ImportAutoConfiguration
|
||||
public @interface JooqTest {
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
|
||||
import org.springframework.boot.test.autoconfigure.orm.jpa.ExampleComponent;
|
||||
@@ -79,4 +80,9 @@ class JooqTestIntegrationTests {
|
||||
assertThat(this.applicationContext).has(importedAutoConfiguration(LiquibaseAutoConfiguration.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
void cacheAutoConfigurationWasImported() {
|
||||
assertThat(this.applicationContext).has(importedAutoConfiguration(CacheAutoConfiguration.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user