diff options
author | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2019-08-15 16:41:17 -0400 |
---|---|---|
committer | Oleg Mitsura <oleg.mitsura@amdocs.com> | 2019-08-27 12:35:23 -0400 |
commit | 54426584a02e6fbfec5f7685c92e1a3fde62309f (patch) | |
tree | d5af6cfb361d2f1d782c109b7f141a4720fcf25b /ms/controllerblueprints/modules/resource-dict/src/test | |
parent | 68676761d63eefc4dccc96dd2df6853cb8e10c42 (diff) |
Make source-db consistent across samples
Issue-Id: CCSDK-1623
Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
Change-Id: Iec7c6909c39c34894be11bfdac45f6394010d9cf
Diffstat (limited to 'ms/controllerblueprints/modules/resource-dict/src/test')
7 files changed, 32 insertions, 34 deletions
diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java index b8185c46a..26a3a2871 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/ResourceDefinitionTest.java @@ -46,9 +46,9 @@ public class ResourceDefinitionTest { @Test public void testDictionaryDefinitionDBSource(){ - String fileName = basePath + "/primary-db-source.json"; + String fileName = basePath + "/processor-db-source.json"; ResourceDefinition resourceDefinition = JacksonUtils.Companion.readValueFromFile(fileName, ResourceDefinition.class); - Assert.assertNotNull("Failed to populate dictionaryDefinition for primary-db type", resourceDefinition); + Assert.assertNotNull("Failed to populate dictionaryDefinition for processor-db type", resourceDefinition); } @Test diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java index 8c4173182..cb7ff88a3 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/factory/ResourceSourceMappingFactoryTest.java @@ -25,15 +25,14 @@ public class ResourceSourceMappingFactoryTest { @Test public void testRegisterResourceMapping() { - ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-db", "source-processor-db"); - ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("processor-db", "source-processor-db"); + ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("processor-db", "source-db"); ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("input", "source-input"); ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("default", "source-default"); - ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-config-data", "source-rest"); - ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("primary-aai-data", "source-rest"); + ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("config-data", "source-rest"); + ResourceSourceMappingFactory.INSTANCE.registerSourceMapping("aai-data", "source-rest"); - String nodeTypeName = ResourceSourceMappingFactory.INSTANCE.getRegisterSourceMapping("primary-db"); - Assert.notNull(nodeTypeName, "Failed to get primary-db mapping"); + String nodeTypeName = ResourceSourceMappingFactory.INSTANCE.getRegisterSourceMapping("processor-db"); + Assert.notNull(nodeTypeName, "Failed to get processor-db mapping"); ResourceSourceMapping resourceSourceMapping = ResourceSourceMappingFactory.INSTANCE.getRegisterSourceMapping(); Assert.notNull(resourceSourceMapping, "Failed to get resource source mapping"); diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java index 93c42445f..ce479d6df 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java +++ b/ms/controllerblueprints/modules/resource-dict/src/test/java/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryUtilsTest.java @@ -60,9 +60,9 @@ public class ResourceDictionaryUtilsTest { Assert.assertEquals("Expected First source Default, but.", ResourceDictionaryConstants.SOURCE_DEFAULT, resourceAssignment.getDictionarySource()); // To Check Assigned Source - resourceAssignment.setDictionarySource(ResourceDictionaryConstants.SOURCE_PROCESSOR_DB); + resourceAssignment.setDictionarySource(ResourceDictionaryConstants.PROCESSOR_DB); ResourceDictionaryUtils.populateSourceMapping(resourceAssignment, resourceDefinition); - Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.SOURCE_PROCESSOR_DB, resourceAssignment.getDictionarySource()); + Assert.assertEquals("Expected Assigned source DB, but.", ResourceDictionaryConstants.PROCESSOR_DB, resourceAssignment.getDictionarySource()); } @@ -79,7 +79,7 @@ public class ResourceDictionaryUtilsTest { Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, inputFirstSource); // TO check the multiple Source - sources.put(ResourceDictionaryConstants.SOURCE_PROCESSOR_DB, new NodeTemplate()); + sources.put(ResourceDictionaryConstants.PROCESSOR_DB, new NodeTemplate()); String multipleFirstSource = ResourceDictionaryUtils.findFirstSource(sources); Assert.assertEquals("Expected source Input, but.", ResourceDictionaryConstants.SOURCE_INPUT, multipleFirstSource); diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt b/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt index 57394173b..fa82f839b 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt +++ b/ms/controllerblueprints/modules/resource-dict/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/resource/dict/utils/ResourceDictionaryTestUtils.kt @@ -22,11 +22,10 @@ object ResourceDictionaryTestUtils { @JvmStatic fun setUpResourceSourceMapping() { - ResourceSourceMappingFactory.registerSourceMapping("primary-db", "source-processor-db") - ResourceSourceMappingFactory.registerSourceMapping("processor-db", "source-processor-db") + ResourceSourceMappingFactory.registerSourceMapping("processor-db", "source-db") ResourceSourceMappingFactory.registerSourceMapping("input", "source-input") ResourceSourceMappingFactory.registerSourceMapping("default", "source-default") - ResourceSourceMappingFactory.registerSourceMapping("primary-config-data", "source-rest") - ResourceSourceMappingFactory.registerSourceMapping("primary-aai-data", "source-rest") + ResourceSourceMappingFactory.registerSourceMapping("config-data", "source-rest") + ResourceSourceMappingFactory.registerSourceMapping("aai-data", "source-rest") } -}
\ No newline at end of file +} diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json index 3bfa4167d..fb2637e1f 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json +++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/cyclic.json @@ -29,7 +29,7 @@ "required": true }, "dictionary-name": "bundle-id", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id" ] @@ -42,7 +42,7 @@ "required": true }, "dictionary-name": "bundle-ip", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id" ] @@ -54,7 +54,7 @@ "type": "string" }, "dictionary-name": "bundle-mac", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id", "bundle-id" @@ -67,7 +67,7 @@ "type": "string" }, "dictionary-name": "managed-ip", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "loopback-ip" ] @@ -90,7 +90,7 @@ "type": "string" }, "dictionary-name": "managed-ip1", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "loopback-ip" ] @@ -102,7 +102,7 @@ "type": "string" }, "dictionary-name": "loopback-ip", - "dictionary-source": "primary-db", + "dictionary-source": "processor-db", "dependencies": [ "bundle-mac", "managed-ip1" diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json index 473920d6d..9bef60d2d 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json +++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/duplicate.json @@ -29,7 +29,7 @@ "required": true }, "dictionary-name": "bundle-id", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id" ] @@ -42,7 +42,7 @@ "required": true }, "dictionary-name": "bundle-ip", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id" ] @@ -54,7 +54,7 @@ "type": "string" }, "dictionary-name": "bundle-mac", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id", "bundle-id" @@ -67,7 +67,7 @@ "type": "string" }, "dictionary-name": "bundle-mac", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "loopback-ip" ] @@ -90,7 +90,7 @@ "type": "string" }, "dictionary-name": "managed-ip1", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "loopback-ip" ] @@ -102,7 +102,7 @@ "type": "string" }, "dictionary-name": "loopback-ip", - "dictionary-source": "primary-db", + "dictionary-source": "processor-db", "dependencies": [ "bundle-mac" ] diff --git a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json index f8fe623fd..8a212abe4 100644 --- a/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json +++ b/ms/controllerblueprints/modules/resource-dict/src/test/resources/validation/success.json @@ -29,7 +29,7 @@ "required": true }, "dictionary-name": "bundle-id", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id" ] @@ -42,7 +42,7 @@ "required": true }, "dictionary-name": "bundle-ip", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id" ] @@ -54,7 +54,7 @@ "type": "string" }, "dictionary-name": "bundle-mac", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "vnf-id", "bundle-id" @@ -67,7 +67,7 @@ "type": "string" }, "dictionary-name": "managed-ip", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "loopback-ip" ] @@ -90,7 +90,7 @@ "type": "string" }, "dictionary-name": "managed-ip1", - "dictionary-source": "primary-config-data", + "dictionary-source": "config-data", "dependencies": [ "loopback-ip" ] @@ -102,7 +102,7 @@ "type": "string" }, "dictionary-name": "loopback-ip", - "dictionary-source": "primary-db", + "dictionary-source": "processor-db", "dependencies": [ "bundle-mac" ] |