Skip to content

Commit

Permalink
CQI-14: Disable demo data loading for integration tests (#9)
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 authored Feb 1, 2024
1 parent 3449368 commit c1d3f76
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.springframework.transaction.annotation.Transactional;

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

@RunWith(SpringRunner.class)
@SpringBootTest(properties = { "notificationToSend.autoStartup=false" })
@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
@Transactional
public abstract class BaseCrudRepositoryIntegrationTest
<T extends Identifiable<I>, I extends Serializable> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
import org.springframework.transaction.support.TransactionCallbackWithoutResult;
import org.springframework.transaction.support.TransactionTemplate;

@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
@RunWith(SpringRunner.class)
@SuppressWarnings("PMD.TooManyMethods")
@SpringBootTest(properties = {"notificationToSend.autoStartup=false"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
@SpringBootTest(
properties = { "notificationToSend.autoStartup=false" },
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ActiveProfiles("test")
@ActiveProfiles({"test", "test-run"})
public abstract class BaseWebIntegrationTest {
private static final String USER_ACCESS_TOKEN = "418c89c5-7f21-4cd1-a63a-38c47892b0fe";
protected static final String USER_ACCESS_TOKEN_HEADER = "Bearer " + USER_ACCESS_TOKEN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,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 c1d3f76

Please sign in to comment.