diff options
author | BT2983 <BT2983@att.com> | 2018-07-23 23:51:20 -0600 |
---|---|---|
committer | BT2983 <BT2983@att.com> | 2018-07-23 23:51:20 -0600 |
commit | f5da5198e43addc77989dee8b500cb69e9885f93 (patch) | |
tree | d68226f2b418787e012bd044f57dea60b1b2a331 /ms/neng/src/test/resources/h2db/changelog | |
parent | 3437d0aa56f7c0630cbd1b9074579f7e0f8a44ae (diff) |
Adding naming micro-service code - more tests.
Integration tests and more unit tests.
Change-Id: Id3500085a43ff817d04d8f407e5cdbc4271dfb35
Issue-ID: CCSDK-342
Signed-off-by: BT2983 <BT2983@att.com>
Diffstat (limited to 'ms/neng/src/test/resources/h2db/changelog')
3 files changed, 44 insertions, 0 deletions
diff --git a/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml b/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml new file mode 100644 index 00000000..496a2e9d --- /dev/null +++ b/ms/neng/src/test/resources/h2db/changelog/h2db.changelog-master.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<databaseChangeLog + xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 + http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"> + + <include file="db/changelog/scripts/rel_18_10/create_base_tables.sql" /> + <include file="db/changelog/scripts/rel_18_10/01_initial_ref_data_v1.sql" /> + <include file="db/changelog/scripts/rel_18_10/02_create_indexes_ddl.sql" /> + <include file="db/changelog/scripts/rel_18_10/04_ref_data_extrn_int.sql" /> + + <include file="h2db/changelog/scripts/50_load_sim_data_dml.sql" /> + <include file="h2db/changelog/scripts/51_ref_data_upd_dml.sql" /> +</databaseChangeLog>
\ No newline at end of file diff --git a/ms/neng/src/test/resources/h2db/changelog/scripts/50_load_sim_data_dml.sql b/ms/neng/src/test/resources/h2db/changelog/scripts/50_load_sim_data_dml.sql new file mode 100644 index 00000000..5c750bd2 --- /dev/null +++ b/ms/neng/src/test/resources/h2db/changelog/scripts/50_load_sim_data_dml.sql @@ -0,0 +1,23 @@ +--liquibase formatted sql +--changeset policy_man_sim:18_06.table_load.sql + +insert into policy_man_sim(policy_name, policy_response) values ('JQINSRIOV.Config_MS_SriovBigJson.1.xml', '[ + { + "policyConfigMessage": "Config Retrieved! ", + "policyConfigStatus": "CONFIG_RETRIEVED", + "type": "JSON", + "config": {"riskLevel":"4","riskType":"test","policyName":"SriovBigJson","service":"SDNC-GenerateName","guard":"False","description":"SriovBigJson","templateVersion":"1607","priority":"4","version":"pannny_nnnn","content":{"policy-instance-name":"NameGenerationPolicyForSRIOV","naming-models":[{"naming-properties":[{"property-operation":"substr(5)","property-name":"COMPLEX"},{"property-name":"SEQUENCE","increment-sequence":{"max":"zzz","scope":"ENTIRETY","start-value":"001","length":"3","increment":"1","sequence-type":"alpha-numeric"}},{"property-name":"NF_NAMING_CODE"}],"naming-type":"VNF","nfRole":"vPE","naming-recipe":"COMPLEX|SEQUENCE|NF_NAMING_CODE"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-name":"SEQUENCE","increment-sequence":{"max":"999","scope":"ENTIRETY","start-value":"001","length":"3","increment":"1","sequence-type":"numeric"}},{"property-operation":"substr(-3)","property-name":"NFC_NAMING_CODE"}],"naming-type":"VM","nfRole":"vPE","naming-recipe":"VNF_NAME|SEQUENCE|NFC_NAMING_CODE"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-name":"VF_MODULE_LABEL"},{"property-name":"VF_MODULE_TYPE"},{"property-name":"SEQUENCE","increment-sequence":{"max":"99","scope":"PRECEEDING","start-value":"01","length":"2","increment":"1","sequence-type":"numeric"}}],"naming-type":"VF-MODULE","nfRole":"vPE","naming-recipe":"VNF_NAME|DELIMITER|VF_MODULE_LABEL|DELIMITER|VF_MODULE_TYPE|DELIMITER|SEQUENCE"},{"naming-properties":[{"property-name":"VF-MODULE_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"volumegroup","property-name":"CONSTANT"}],"naming-type":"VOLUME_GROUP","nfRole":"vPE","naming-recipe":"VF-MODULE_NAME|DELIMITER|CONSTANT"},{"naming-properties":[{"property-name":"VOLUME_GROUP_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"volume","property-name":"CONSTANT"},{"property-name":"SEQUENCE","increment-sequence":{"max":"99","scope":"PRECEEDING","start-value":"01","length":"2","increment":"1","sequence-type":"numeric"}}],"naming-type":"VOLUME","nfRole":"vPE","naming-recipe":"VOLUME_GROUP_NAME|DELIMITER|CONSTANT|DELIMITER|SEQUENCE"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"affinity","property-name":"CONSTANT"}],"naming-type":"AFFINITY","nfRole":"vPE","naming-recipe":"VNF_NAME|DELIMITER|CONSTANT"},{"naming-properties":[{"property-name":"VNF_NAME"},{"property-value":"-","property-name":"DELIMITER"},{"property-value":"INT","property-name":"CONSTANT"},{"property-name":"SEQUENCE","increment-sequence":{"max":"99","scope":"PRECEEDING","start-value":"01","length":"2","increment":"1","sequence-type":"numeric"}}],"naming-type":"INTERNAL_NETWORK","nfRole":"vPE","naming-recipe":"VNF_NAME|DELIMITER|CONSTANT|SEQUENCE"}]}}, + "policyName": "JQINSRIOV.Config_MS_SriovBigJson.1.xml", + "policyType": "MicroService", + "policyVersion": "1", + "matchingConditions": { + "ECOMPName": "SDNC", + "ONAPName": "SDNC", + "service": "SDNC-GenerateName" + }, + "responseAttributes": {}, + "property": null + } +]'); + +commit;
\ No newline at end of file diff --git a/ms/neng/src/test/resources/h2db/changelog/scripts/51_ref_data_upd_dml.sql b/ms/neng/src/test/resources/h2db/changelog/scripts/51_ref_data_upd_dml.sql new file mode 100644 index 00000000..2114a624 --- /dev/null +++ b/ms/neng/src/test/resources/h2db/changelog/scripts/51_ref_data_upd_dml.sql @@ -0,0 +1,5 @@ +--liquibase formatted sql +--changeset ref_data_update:18_10.ref_data_update.sql + +DELETE FROM SERVICE_PARAMETER where NAME='use_db_policy'; +INSERT INTO SERVICE_PARAMETER(NAME, VALUE, CREATED_BY) VALUES ('use_db_policy','Y','Initial'); |