I'm working here on some tests, I start from the bottom, reactiveRepository and successfully wrote all necessary tests with com.playtika.testcontainers.embedded-mongodb
and embedded.mongodb.enabled: true
in test/resources bootstrap.yml
Now I moved one layer up, to the @Services, but I spot that testcontainers
still executes embedded-mongodb
which I don't need, as I'm just mocking repository for Services tests:
@MockBean
private UserRepository userRepository;
@Test
blah blah blah() {
Mockito.when(userRepository.findByUsername(loginRequest.getUsername())).thenReturn(Mono.just(fakeUser));
}
Any hints on how to exclude embedded-mongo
autoconfiguration?
or set embedded.mongodb.enabled: false
for specific test case?