Commit 1050eaf5 authored by Enriko Käsper's avatar Enriko Käsper
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Enriko Käsper

See merge request teis/classifiers-service!55
parents 627de21f ebad466c
theGroup=ee.sm.ti.teis
theVersion=1.9.0
commonsVersion=1.8.0
theVersion=1.10.0
commonsVersion=1.10.0
commonApiGatewayVersion=1.8.0
officeApiGatewayVersion=1.8.0
schedulerVersion=1.5.0
......
......@@ -28,7 +28,7 @@ public class QueueConfig implements QueueList {
@Override
public void updateQueues(ArrayList<TeisQueue> queues) {
String queueName = "classifier-service" + TestDataImportService.RESET_TEST_DATA_QUEUE_SUFIX;
String queueName = "classifier-service" + TestDataImportService.RESET_TEST_DATA_QUEUE_SUFFIX;
addGwQueue(queues, "gwResetTestData", TestDataImportService.RESET_TEST_DATA_ROUTING_KEY, queueName);
addGwQueue(queues, "gwClassifierItemsQueue", ClassifierItemsRequest.ROUTING_KEY, GW_CLASSIFIER_ITEMS_QUEUE);
......
......@@ -2,18 +2,21 @@ package ee.sm.ti.teis.classifiers.test;
import ee.sm.ti.teis.servicecommon.util.TestDataImportService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
import static ee.sm.ti.teis.servicecommon.util.TestDataImportService.*;
@Service
@AllArgsConstructor
@RequiredArgsConstructor
@Profile({"dev", "local", "test"})
public class ResetTestDataListener {
private TestDataImportService testDataImportService;
private final TestDataImportService testDataImportService;
@RabbitListener(queues = {"classifier-service" + TestDataImportService.RESET_TEST_DATA_QUEUE_SUFIX})
@RabbitListener(queues = {"classifier-service" + RESET_TEST_DATA_QUEUE_SUFFIX})
public void resetTestData(String providedMagicString) {
testDataImportService.resetTestData(providedMagicString);
}
......
--liquibase formatted sql
--changeset jyrgen:2020-08-17.add-placeholder-risk-factor-category
INSERT INTO classifier_definition (id, default_value, editable, name, hierarchical)
VALUES ('RISK_FACTOR_CATEGORY', null, true, 'Riskianalüüsi riski kategooriate grupp (liigituse kõrgem tase).', false);
\ No newline at end of file
......@@ -8,7 +8,7 @@ DELETE FROM classifier_attribute_value WHERE value LIKE 'TEIS-TEST%' OR classifi
DELETE FROM classifier_item_link WHERE source_classifier_item_id LIKE 'TEST_%';
DELETE FROM classifier_item_link WHERE target_classifier_item_id LIKE 'TEST_%';
DELETE FROM classifier_item WHERE (classifier_definition_id != 'EMTAK' AND seq_no >= 10000000)
OR classifier_definition_id LIKE 'TEST_%';
OR classifier_definition_id LIKE 'TEST_%' OR code LIKE 'PLACEHOLDER_FOR_TESTING%';
DELETE FROM classifier_definition WHERE id LIKE 'TEST_%';
DELETE FROM classifier_attribute_definition WHERE id LIKE 'TEST_%';
......@@ -95,12 +95,15 @@ VALUES
('INSPECTION_TOPIC__INSPECTION_TOPIC_3_2_1','INSPECTION_TOPIC','INSPECTION_TOPIC_3_2_1',TRUE, '3.2.1. Kas liikumisteed on märgistatud korrektselt?', 'CURRENT', 100000001, 'INSPECTION_TOPIC__INSPECTION_TOPIC_3_2', now(), null, 3),
('INSPECTION_TOPIC__INSPECTION_TOPIC_3_2_2','INSPECTION_TOPIC','INSPECTION_TOPIC_3_2_2',TRUE, '3.2.2. Kas liikumisteel esinevad takistused on märgistatud?', 'CURRENT', 100000002, 'INSPECTION_TOPIC__INSPECTION_TOPIC_3_2', now(), null,3 ),
('INSPECTION_TOPIC__INSPECTION_TOPIC_3_2_3','INSPECTION_TOPIC','INSPECTION_TOPIC_3_2_3',TRUE, '3.2.3. Kas tõkestatud liikumisteede puhul on liikumine märgistusega ümber suunatud?', 'CURRENT', 100000003, 'INSPECTION_TOPIC__INSPECTION_TOPIC_3_2', now(), null, 3),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__FISHING', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'FISHING', FALSE, 'just fishing stuff', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__DEMOLITION', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'DEMOLITION', FALSE, 'wrecking stuff', 'CURRENT', 100000002, null,now(),null, null),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__MEDICINE', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'MEDICINE', FALSE, 'fixing humanoids', 'CURRENT', 100000003, null,now(),null, null),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__FISHING', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'FISHING', FALSE, 'just fishing stuff', 'CURRENT', 100000001, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__DEMOLITION', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'DEMOLITION', FALSE, 'wrecking stuff', 'CURRENT', 100000002, null,now(),null, 1),
('TEST_RISK_BUSINESS_TYPE_CATEGORY__MEDICINE', 'TEST_RISK_BUSINESS_TYPE_CATEGORY', 'MEDICINE', FALSE, 'fixing humanoids', 'CURRENT', 100000003, null,now(),null, 1),
('TEST_RISK_FACTOR_CATEGORY__RADIATION', 'TEST_RISK_FACTOR_CATEGORY', 'RADIATION', FALSE, 'Radiatsiooni tase', 'CURRENT', 100000001, null,now(),null, null),
('TEST_RISK_FACTOR_CATEGORY__ABSORB', 'TEST_RISK_FACTOR_CATEGORY', 'ABSORB', FALSE, 'Imavuse tähtis mõõdik', 'CURRENT', 100000002, null,now(),null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING', TRUE, 'Ajutine klassifikaator testimiseks', 'CURRENT', 100000004, null, now(), null, null);
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING', TRUE, 'Ajutine klassifikaator testimiseks', 'CURRENT', 100000004, null, now(), null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING2', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING2', TRUE, 'Ajutine klassifikaator 2 testimiseks', 'DELETED', 100000005, null, now(), null, null),
('RISK_BUSINESS_TYPE_CATEGORY__PLACEHOLDER_FOR_TESTING3', 'RISK_BUSINESS_TYPE_CATEGORY', 'PLACEHOLDER_FOR_TESTING3', TRUE, 'Ajutine klassifikaator 3 testimiseks', 'CURRENT', 100000006, null, now(), null, null),
('RISK_FACTOR_CATEGORY__PLACEHOLDER_FOR_TESTING', 'RISK_FACTOR_CATEGORY', 'PLACEHOLDER_FOR_TESTING', FALSE, 'Placeholder for testing risk factor category', 'CURRENT', 100000005, null, now(),null,null);
/*ATTRIBUTE VALUES*/
INSERT INTO classifier_attribute_value (
......
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