mirror of
https://github.com/valitydev/wb-list-manager.git
synced 2024-11-06 01:35:17 +00:00
refactror riak test config
This commit is contained in:
parent
e83383ed92
commit
c8e6cecd76
@ -5,6 +5,7 @@ import com.rbkmoney.damsel.wb_list.Command;
|
||||
import com.rbkmoney.testcontainers.annotations.KafkaSpringBootTest;
|
||||
import com.rbkmoney.testcontainers.annotations.kafka.KafkaTestcontainer;
|
||||
import com.rbkmoney.testcontainers.annotations.kafka.config.KafkaProducer;
|
||||
import com.rbkmoney.wb.list.manager.config.MockedStartupInitializers;
|
||||
import com.rbkmoney.wb.list.manager.exception.RiakExecutionException;
|
||||
import com.rbkmoney.wb.list.manager.repository.ListRepository;
|
||||
import org.apache.thrift.TBase;
|
||||
@ -12,6 +13,7 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.test.context.TestPropertySource;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
@ -20,6 +22,7 @@ import static org.mockito.Mockito.*;
|
||||
@KafkaSpringBootTest
|
||||
@TestPropertySource(properties = {"retry.timeout=100"})
|
||||
@KafkaTestcontainer(topicsKeys = {"kafka.wblist.topic.command", "kafka.wblist.topic.event.sink"})
|
||||
@Import(MockedStartupInitializers.class)
|
||||
public class WbListSafetyApplicationTest {
|
||||
|
||||
@Value("${kafka.wblist.topic.command}")
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.rbkmoney.wb.list.manager.config;
|
||||
|
||||
import org.springframework.boot.test.context.TestConfiguration;
|
||||
import org.springframework.boot.test.mock.mockito.MockBean;
|
||||
|
||||
@TestConfiguration
|
||||
public class MockedStartupInitializers {
|
||||
|
||||
@MockBean
|
||||
private RiakInitializer riakInitializer;
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user