Commit 21ff3a21 authored by Ivar Meikas's avatar Ivar Meikas

TEIS-128 - reset test data

parent 24b3f205
theGroup=ee.sm.ti.teis
theVersion=0.2.0-SNAPSHOT
commonsVersion=0.19.16-SNAPSHOT
commonsVersion=0.20.31-SNAPSHOT
officeApiGatewayVersion=0.7.0-SNAPSHOT
pluginVersion=0.0.18-SNAPSHOT
mapstructVersion=1.3.0.Final
......
......@@ -14,6 +14,7 @@ import ee.sm.ti.teis.domainrequest.DomainDeleteDTO;
import ee.sm.ti.teis.domainrequest.DomainQueryDTO;
import ee.sm.ti.teis.domainrequest.DomainRequestDTO;
import ee.sm.ti.teis.officegateway.official.request.*;
import ee.sm.ti.teis.servicecommon.util.TestDataImportService;
import org.springframework.context.annotation.Configuration;
import java.util.ArrayList;
......@@ -52,6 +53,9 @@ public class QueueConfig implements QueueList {
@Override
public void updateQueues(ArrayList<TeisQueue> queues) {
String queueName = "officials-service" + TestDataImportService.RESET_TEST_DATA_QUEUE_PREFIX;
addGwQueue(queues, "gwResetTestData", TestDataImportService.RESET_TEST_DATA_ROUTING_KEY, queueName);
addGwQueue(queues, "gwCreateUserQueue", CreateOfficialUserRequest.ROUTING_KEY, GW_CREATE_OFFICIAL_USER_QUEUE);
addGwQueue(queues, "gwFindUserQueue", OfficialUserRequest.ROUTING_KEY, GW_OFFICIAL_USER_QUEUE);
addGwQueue(queues, "gwFindUsersQueue", OfficialUsersRequest.ROUTING_KEY, GW_OFFICIAL_USERS_QUEUE);
......
package ee.sm.ti.teis.officials.test;
import ee.sm.ti.teis.servicecommon.util.TestDataImportService;
import lombok.AllArgsConstructor;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
@Service
@AllArgsConstructor
@Profile({"dev", "local", "test"})
public class ResetTestDataListener {
private TestDataImportService testDataImportService;
@RabbitListener(queues = {"officials-service" + TestDataImportService.RESET_TEST_DATA_QUEUE_PREFIX})
public void resetTestData(String providedMagicString) {
testDataImportService.resetTestData(providedMagicString);
}
}
--liquibase formatted sql
--changeset raigo:import_test_data runAlways:true runOnChange:true context:local,dev,integtest,test
--changeset raigo:import_test_data runAlways:false runOnChange:true context:local,dev,integtest,test
DELETE FROM cache.cache_classifier_item;
DELETE from officials_group_emtak;
DELETE from official_user;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment