Skip to content
Snippets Groups Projects
Unverified Commit c6941f33 authored by Martin Weise's avatar Martin Weise
Browse files

Attempt to fix test

parent 95d80c95
No related branches found
No related tags found
4 merge requests!129New module for citation as they occur multiple,!121Modified logging, modified logging level, modified flasgger endpoint,!113Resolve "Bugs related with Query Service",!109Resolve "Use MariaDB for metadata database"
package at.tuwien.endpoint;
import at.tuwien.BaseUnitTest;
import at.tuwien.config.IndexInitializer;
import at.tuwien.config.ReadyConfig;
import at.tuwien.endpoints.TableEndpoint;
import at.tuwien.entities.database.table.Table;
import at.tuwien.exception.DatabaseNotFoundException;
import at.tuwien.repository.elastic.TableColumnidxRepository;
import at.tuwien.repository.elastic.TableidxRepository;
import at.tuwien.service.DatabaseService;
import com.rabbitmq.client.Channel;
import org.apache.http.auth.BasicUserPrincipal;
......@@ -16,6 +20,7 @@ import org.springframework.test.context.junit.jupiter.SpringExtension;
import javax.ws.rs.NotAllowedException;
import java.security.Principal;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
......@@ -36,6 +41,24 @@ public class TableEndpointUnitTest extends BaseUnitTest {
@MockBean
private Channel channel;
/**
* ElasticSearch not required in this test
*/
@MockBean
private IndexInitializer indexInitializer;
/**
* ElasticSearch not required in this test
*/
@MockBean
private TableidxRepository tableidxRepository;
/**
* ElasticSearch not required in this test
*/
@MockBean
private TableColumnidxRepository tableColumnidxRepository;
@MockBean
private DatabaseService databaseService;
......
......@@ -45,18 +45,33 @@ import static org.mockito.Mockito.when;
@ExtendWith(SpringExtension.class)
public class TableServiceIntegrationTest extends BaseUnitTest {
/**
* RabbitMQ not required in this test
*/
@MockBean
private ReadyConfig readyConfig;
/**
* RabbitMQ not required in this test
*/
@MockBean
private Channel channel;
/**
* ElasticSearch not required in this test
*/
@MockBean
private IndexInitializer indexInitializer;
/**
* ElasticSearch not required in this test
*/
@MockBean
private TableidxRepository tableidxRepository;
/**
* ElasticSearch not required in this test
*/
@MockBean
private TableColumnidxRepository tableColumnidxRepository;
......@@ -75,12 +90,6 @@ public class TableServiceIntegrationTest extends BaseUnitTest {
@Autowired
private TableService tableService;
@Autowired
private UserRepository userRepository;
@Autowired
private ImageEnvironmentRepository imageEnvironmentRepository;
@BeforeAll
public static void beforeAll() throws InterruptedException {
afterAll();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment