Skip to content

Commit

Permalink
CQI-14: Disable demo data loading for integration tests
Browse files Browse the repository at this point in the history
Demo data was previously being loaded before the tests were run, so they were affected by records fetched from a csv.
  • Loading branch information
anawrotsoldevelo committed Dec 13, 2023
1 parent 2caea36 commit 8c6fd82
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
import org.springframework.transaction.annotation.Transactional;

@Transactional
@ActiveProfiles({"test", "init-audit-log"})
@ActiveProfiles({"test", "init-audit-log", "test-run"})
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
@SuppressWarnings({"PMD.TooManyMethods"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import org.springframework.transaction.annotation.Transactional;

@RunWith(SpringRunner.class)
@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
@SpringBootTest
@Transactional
public class JaVersIntegrationTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

@RunWith(SpringRunner.class)
@SpringBootTest
@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
@Transactional
public abstract class BaseCrudRepositoryIntegrationTest<T extends Identifiable> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

@RunWith(SpringRunner.class)
@SpringBootTest(classes = {Application.class, DataImportService.class})
@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
@Transactional
@SuppressWarnings({"PMD.TooManyMethods"})
public class DataImportServiceIntegrationTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
@SuppressWarnings({"PMD.TooManyMethods"})
public abstract class BaseWebIntegrationTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.springframework.stereotype.Component;

@Component
@Profile("demo-data")
@Profile("demo-data & !test-run")
@Order(5)
public class TestDataInitializer implements CommandLineRunner {
private static final XLogger XLOGGER = XLoggerFactory.getXLogger(TestDataInitializer.class);
Expand Down

0 comments on commit 8c6fd82

Please sign in to comment.