refactror riak test config

This commit is contained in:
Anatoly Karlov 2021-09-30 20:32:43 +07:00
parent e83383ed92
commit c8e6cecd76
2 changed files with 15 additions and 0 deletions

View File

@ -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}")

View File

@ -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;
}