Skip to content

Commit

Permalink
#1187 - Make possible to delete entire layers
Browse files Browse the repository at this point in the history
- Do not try to run liquibase in Spring unit tests
  • Loading branch information
reckart committed Jan 10, 2021
1 parent 9ab2d17 commit 9d9d425
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions webanno-api-dao/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@
<artifactId>commons-compress</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.annotation.Bean;
Expand All @@ -49,7 +50,7 @@

@RunWith(SpringRunner.class)
@EnableAutoConfiguration
@DataJpaTest
@DataJpaTest(excludeAutoConfiguration = LiquibaseAutoConfiguration.class)
@EntityScan({ "de.tudarmstadt.ukp.clarin.webanno.model",
"de.tudarmstadt.ukp.clarin.webanno.security.model" })
@Transactional(propagation = Propagation.NEVER)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.context.ApplicationEventPublisher;
Expand Down Expand Up @@ -90,7 +91,7 @@
import de.tudarmstadt.ukp.clarin.webanno.webapp.remoteapi.aero.AeroRemoteApiController;

@RunWith(SpringRunner.class)
@EnableAutoConfiguration
@EnableAutoConfiguration(exclude = LiquibaseAutoConfiguration.class)
@SpringBootTest(webEnvironment = WebEnvironment.MOCK, properties = {
"repository.path=target/AeroRemoteApiControllerTest/repository" })
@EnableWebSecurity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
Expand Down Expand Up @@ -61,7 +62,8 @@
import de.tudarmstadt.ukp.clarin.webanno.webapp.remoteapi.webhooks.json.ProjectStateChangeMessage;

@RunWith(SpringRunner.class)
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class })
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class,
LiquibaseAutoConfiguration.class })
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class WebhookServiceTest
{
Expand Down

0 comments on commit 9d9d425

Please sign in to comment.