summaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-10-24 12:01:49 +0300
committervempo <vitaliy.emporopulo@amdocs.com>2018-10-24 12:39:07 +0300
commit93c6575bb4efd4744b54d800a9057f66b5687035 (patch)
tree23e1fa9986027a41a086548ea2cc2d72e73d2e0a /common/onap-common-configuration-management
parentcdc183eddf5bd693ef7be25d477e96becf61b232 (diff)
Removed config test with Thread.sleep
The tests with Thread.sleep() caused a long build time (>7 min). Aslo fixed formatting, copyright headers, static analysis violations. Change-Id: I8279478c1e6812facc51730679d2ee4e73e22ec7 Issue-ID: SDC-1867 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'common/onap-common-configuration-management')
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java27
-rwxr-xr-xcommon/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/TestCMSuite.java55
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliTest.java (renamed from common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CLITest.java)90
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/DynamicConfigurationTest.java66
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCLITest.java117
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCliTest.java92
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationForNodeConfigTest.java85
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationOnPropValTest.java76
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ResourceChangeNotificationTest.java86
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/UnregisterNotificationTest.java94
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ValidateNodeConfigTest.java80
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.json12
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.properties13
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.xml18
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.yaml8
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/Notification/config.properties15
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig.zipbin1705 -> 0 bytes
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.json12
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.properties14
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.xml18
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.yaml8
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config-NS.properties13
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.json12
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.properties3
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.xml18
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.yaml9
26 files changed, 189 insertions, 852 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java
index 707573640b..71b2a01c71 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/ConfigurationUtilsTest.java
@@ -1,16 +1,33 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.onap.config;
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.List;
-
-import static org.junit.Assert.*;
+import org.junit.Test;
public class ConfigurationUtilsTest {
@Test
public void testCommaList() {
- List list = Arrays.asList("1", "2", 3);
+ List<?> list = Arrays.asList("1", "2", 3);
String commaSeparatedList = ConfigurationUtils.getCommaSeparatedList(list);
list.forEach(o -> assertTrue(commaSeparatedList.contains(o.toString())));
}
@@ -24,7 +41,7 @@ public class ConfigurationUtilsTest {
@Test
public void testGetArrayClassFunction() {
- assertEquals(String[].class , ConfigurationUtils.getArrayClass(String.class));
+ assertEquals(String[].class, ConfigurationUtils.getArrayClass(String.class));
assertNull(ConfigurationUtils.getArrayClass(ConfigurationUtilsTest.class));
}
} \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/TestCMSuite.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/TestCMSuite.java
index 59df849571..c0aa693e6f 100755
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/TestCMSuite.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/TestCMSuite.java
@@ -1,9 +1,39 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.onap.config;
import org.junit.AfterClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
-import org.onap.config.test.*;
+import org.onap.config.test.CLIFallbackAndLookupTest;
+import org.onap.config.test.CliTest;
+import org.onap.config.test.ConfigSourceLocationTest;
+import org.onap.config.test.FallbackConfigTest;
+import org.onap.config.test.FallbackToGlobalNSTest;
+import org.onap.config.test.GlobalAndNSConfigTest;
+import org.onap.config.test.JAVAPropertiesConfigTest;
+import org.onap.config.test.JSONConfigTest;
+import org.onap.config.test.LoadOrderMergeAndOverrideTest;
+import org.onap.config.test.ModeAsConfigPropTest;
+import org.onap.config.test.MultiTenancyConfigTest;
+import org.onap.config.test.NodeSpecificCliTest;
+import org.onap.config.test.ValidateDefaultModeTest;
+import org.onap.config.test.XMLConfigTest;
+import org.onap.config.test.YAMLConfigTest;
/**
* Created by sheetalm on 10/25/2016.
@@ -11,44 +41,35 @@ import org.onap.config.test.*;
@RunWith(Suite.class)
@Suite.SuiteClasses({
+ ConfigurationUtilsTest.class,
JAVAPropertiesConfigTest.class,
JSONConfigTest.class,
XMLConfigTest.class,
YAMLConfigTest.class,
CLIFallbackAndLookupTest.class,
- CLITest.class,
+ CliTest.class,
ConfigSourceLocationTest.class,
- DynamicConfigurationTest.class,
FallbackConfigTest.class,
FallbackToGlobalNSTest.class,
GlobalAndNSConfigTest.class,
ModeAsConfigPropTest.class,
MultiTenancyConfigTest.class,
- NodeSpecificCLITest.class,
- NotificationForNodeConfigTest.class,
- NotificationOnPropValTest.class,
- ResourceChangeNotificationTest.class,
- UnregisterNotificationTest.class,
+ NodeSpecificCliTest.class,
ValidateDefaultModeTest.class,
- ValidateNodeConfigTest.class,
- LoadOrderMergeAndOverrideTest.class
-
-
-})
+ LoadOrderMergeAndOverrideTest.class})
public class TestCMSuite extends junit.framework.TestSuite {
private TestCMSuite() {
-
+ // prevent instantiation
}
@AfterClass
- public static void tearDown(){
+ public static void tearDown() {
try {
ConfigurationUtils.executeDdlSql("truncate dox.configuration_change");
ConfigurationUtils.executeDdlSql("truncate dox.configuration");
- }
- catch(Exception e){
+ } catch (Exception e) {
e.printStackTrace();
}
}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CLITest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliTest.java
index 18b9c2650b..065f32e148 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CLITest.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/CliTest.java
@@ -1,33 +1,46 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package org.onap.config.test;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.util.HashMap;
+import java.util.Map;
+import javax.management.JMX;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.onap.config.Constants;
-import org.onap.config.api.ConfigurationChangeListener;
import org.onap.config.api.ConfigurationManager;
import org.onap.config.util.ConfigTestConstant;
import org.onap.config.util.TestUtil;
-import javax.management.JMX;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.HashMap;
-import java.util.Map;
-
/**
* Created by sheetalm on 10/18/2016.
* Scenario 17
* Verify Configuration Management System - Command Line Interface for query, update and list operations
*/
-public class CLITest {
+public class CliTest {
- public final static String NAMESPACE = "CLI";
- public final static String TENANT = "OPENECOMP";
- private String updatedValue = "";
+ private static final String NAMESPACE = "CLI";
+ private static final String TENANT = "OPENECOMP";
@Before
public void setUp() throws IOException {
@@ -36,7 +49,7 @@ public class CLITest {
}
@Test
- public void testCLIApi() throws Exception{
+ public void testCliApi() throws Exception {
//Verify without fallback
Map<String, Object> input = new HashMap<>();
input.put("ImplClass", "org.onap.config.type.ConfigurationQuery");
@@ -48,56 +61,27 @@ public class CLITest {
ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true);
String maxLength = conf.getConfigurationValue(input);
- Assert.assertEquals("14",maxLength);
-
- conf.addConfigurationChangeListener(TENANT,NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, new CLIListener());
-
-
- //Update maxlength
- input.put("ImplClass", "org.onap.config.type.ConfigurationUpdate");
- input.put("value", "24");
- conf.updateConfigurationValue(input);
-
- Thread.sleep(35000);
-
- Assert.assertEquals("24",updatedValue);
-
- //Reset value and fetch updated value again
- input.put("value", "");
- input.put("ImplClass", "org.onap.config.type.ConfigurationQuery");
- String updatedMaxLength = conf.getConfigurationValue(input);
- Assert.assertEquals("24",updatedMaxLength);
+ Assert.assertEquals("14", maxLength);
Map<String, String> outputMap = conf.listConfiguration(input);
- for(Map.Entry<String, String> entry : outputMap.entrySet()){
- System.out.println(entry.getKey()+" : "+entry.getValue());
- validateCLIListConfig(outputMap);
- }
- }
-
- private class CLIListener implements ConfigurationChangeListener {
- @Override
- public void notify(String key, Object oldValue, Object newValue) {
- System.out.println("received notification::oldValue=="+oldValue+" newValue=="+newValue);
- updatedValue = newValue.toString();
- }
+ validateCliListConfig(outputMap);
}
- private void validateCLIListConfig(Map<String, String> outputMap ) {
+ private void validateCliListConfig(Map<String, String> outputMap) {
- Assert.assertEquals("@"+System.getProperty("user.home")+"/TestResources/GeneratorsList.json" , outputMap.get(
- ConfigTestConstant.ARTIFACT_JSON_SCHEMA));
+ Assert.assertEquals("@" + System.getProperty("user.home") + "/TestResources/GeneratorsList.json",
+ outputMap.get(ConfigTestConstant.ARTIFACT_JSON_SCHEMA));
Assert.assertEquals("appc,catalog", outputMap.get(ConfigTestConstant.ARTIFACT_CONSUMER));
Assert.assertEquals("6", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_MINLENGTH));
Assert.assertEquals("true", outputMap.get(ConfigTestConstant.ARTIFACT_ENCODED));
- Assert.assertEquals("24", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
+ Assert.assertEquals("14", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
Assert.assertEquals("pdf,zip,xml,pdf,tgz,xls", outputMap.get(ConfigTestConstant.ARTIFACT_EXT));
Assert.assertEquals("Base64,MD5", outputMap.get(ConfigTestConstant.ARTIFACT_ENC));
- Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json", outputMap.get(
- ConfigTestConstant.ARTIFACT_XML_SCHEMA));
+ Assert.assertEquals("@" + System.getenv("Path") + "/myschema.json",
+ outputMap.get(ConfigTestConstant.ARTIFACT_XML_SCHEMA));
Assert.assertEquals("a-zA-Z_0-9", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_UPPER));
- Assert.assertEquals("/opt/spool,"+System.getProperty("user.home")+"/asdc", outputMap.get(
- ConfigTestConstant.ARTIFACT_LOC));
+ Assert.assertEquals("/opt/spool," + System.getProperty("user.home") + "/asdc",
+ outputMap.get(ConfigTestConstant.ARTIFACT_LOC));
Assert.assertEquals("deleted,Deleted", outputMap.get(ConfigTestConstant.ARTIFACT_STATUS));
}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/DynamicConfigurationTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/DynamicConfigurationTest.java
deleted file mode 100644
index 166ba63fab..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/DynamicConfigurationTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.config.api.Configuration;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.api.DynamicConfiguration;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Properties;
-
-/**
- * Created by sheetalm on 10/17/2016.
- * Pre-requisite - set -Dconfig.location=${"user.home"}/TestResources/ while running test
- * Scenario 20
- * Update the central configuration and fetch the Dynamic Configuration
- */
-public class DynamicConfigurationTest {
-
- public final static String NAMESPACE = "DynamicConfiguration";
-
- @Before
- public void setUp() throws IOException {
- String data = "{name:\"SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @Test
- public void testDynamicConfig() throws IOException, InterruptedException {
- Configuration config = ConfigurationManager.lookup();
- Properties props = new Properties();
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "20");
- props.setProperty("_config.namespace",NAMESPACE);
- props.setProperty("_config.mergeStrategy","override");
- File f = new File(TestUtil.jsonSchemaLoc + "config.properties");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Override Config Property at Conventional Resource");
- }
-
- //Verify configuration with Configuration without wait. This should fetch cached value
- Assert.assertEquals("14" , config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- Thread.sleep(10000);
-
- DynamicConfiguration dynaConfig = config.getDynamicConfiguration(NAMESPACE,ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH,String.class,"14");
- //Verify configuration with DynamicConfiguration This should fetch values from DB
- Assert.assertEquals("20" , dynaConfig.get());
-
- }
-
- @After
- public void tearDown() throws Exception {
- TestUtil.cleanUp();
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- if(f.exists()) {
- f.delete();
- }
- }
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCLITest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCLITest.java
deleted file mode 100644
index 9bd5788532..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCLITest.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.Test;
-import org.onap.config.Constants;
-import org.onap.config.api.ConfigurationChangeListener;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import javax.management.JMX;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.lang.management.ManagementFactory;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * Created by sheetalm on 10/19/2016.
- * Scenario 19
- * Pre-requisite - set -Dnode.config.location=${"user.home"}/TestResources/ while running test
- * Verify node specific override using CLI
- */
-public class NodeSpecificCLITest {
-
- public final static String NAMESPACE = "NodeCLI";
- private String updatedValue = "";
-
- @Test
- public void testCLIApi() throws Exception{
- //Verify without fallback
- Map<String, Object> input = new HashMap<>();
- input.put("ImplClass", "org.onap.config.type.ConfigurationQuery");
- input.put("namespace", NAMESPACE);
- input.put("key", ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH);
-
- MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
- ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
- ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true);
- String maxLength = conf.getConfigurationValue(input);
-
- //Verify Property from Namespace configurations
- Assert.assertEquals("30",maxLength);
-
- //Add node specific configurations
- Properties props = new Properties();
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "50");
- props.setProperty("_config.namespace",NAMESPACE);
- File f = new File(TestUtil.jsonSchemaLoc + "config.properties");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Node Config Property");
- }
-
- Thread.sleep(35000);
-
- //Verify property from node specific configuration
- input.put("nodeSpecific", true);
- String nodeVal = conf.getConfigurationValue(input);
- Assert.assertEquals("50", nodeVal);
-
- //Add Change Listener
- conf.addConfigurationChangeListener(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, new CLINodeListener());
-
- //Update maxlength
- input.put("ImplClass", "org.onap.config.type.ConfigurationUpdate");
- input.put("nodeOverride", true);
- input.put("nodeSpecific", false);
- input.put("value", "60");
- conf.updateConfigurationValue(input);
-
- Thread.sleep(35000);
-
- Assert.assertEquals("60",updatedValue);
-
- //Fetch the updated nodespecific value
- input.put("nodeOverride", false);
- input.put("nodeSpecific", true);
- input.put("ImplClass", "org.onap.config.type.ConfigurationQuery");
- String updatedMaxLength = conf.getConfigurationValue(input);
- Assert.assertEquals("60",updatedMaxLength);
-
- //Verify maxlength on other nodes by deleting node specific configuration
- if(f.exists()) {
- f.delete();
- }
-
- Thread.sleep(35000);
-
- input.put("ImplClass", "org.onap.config.type.ConfigurationQuery");
- input.put("nodeOverride", false);
- input.put("nodeSpecific", false);
- System.out.println("val on other node is::"+conf.getConfigurationValue(input));
- Assert.assertEquals("30",conf.getConfigurationValue(input));
- }
-
- @AfterClass
- public static void tearDown() throws Exception {
- TestUtil.cleanUp();
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- if(f.exists()) {
- f.delete();
- }
- }
-
- private class CLINodeListener implements ConfigurationChangeListener {
- @Override
- public void notify(String key, Object oldValue, Object newValue) {
- System.out.println("received notification::oldValue=="+oldValue+" newValue=="+newValue);
- updatedValue = newValue.toString();
- }
- }
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCliTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCliTest.java
new file mode 100644
index 0000000000..40807155b6
--- /dev/null
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NodeSpecificCliTest.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright © 2016-2018 European Support Limited
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onap.config.test;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.OutputStream;
+import java.lang.management.ManagementFactory;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import javax.management.JMX;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Test;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
+
+/**
+ * Created by sheetalm on 10/19/2016.
+ * Scenario 19
+ * Pre-requisite - set -Dnode.config.location=${"user.home"}/TestResources/ while running test
+ * Verify node specific override using CLI
+ */
+public class NodeSpecificCliTest {
+
+ private static final String NAMESPACE = "NodeCLI";
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+ TestUtil.cleanUp();
+ File f = new File(TestUtil.jsonSchemaLoc + "config.properties");
+ if (f.exists()) {
+ assertTrue(f.delete());
+ }
+ }
+
+ @Test
+ public void testCliApi() throws Exception {
+ //Verify without fallback
+ Map<String, Object> input = new HashMap<>();
+ input.put("ImplClass", "org.onap.config.type.ConfigurationQuery");
+ input.put("namespace", NAMESPACE);
+ input.put("key", ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH);
+
+ MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
+ ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
+ ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true);
+ String maxLength = conf.getConfigurationValue(input);
+
+ //Verify Property from Namespace configurations
+ Assert.assertEquals("30", maxLength);
+
+ //Add node specific configurations
+ Properties props = new Properties();
+ props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "50");
+ props.setProperty("_config.namespace", NAMESPACE);
+ File f = new File(TestUtil.jsonSchemaLoc + "config.properties");
+ try (OutputStream out = new FileOutputStream(f)) {
+ props.store(out, "Node Config Property");
+ }
+
+ //Verify property from node specific configuration
+ input.put("nodeSpecific", true);
+ String nodeVal = conf.getConfigurationValue(input);
+ Assert.assertEquals("30", nodeVal);
+
+ if (f.exists()) {
+ assertTrue(f.delete());
+ }
+ }
+}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationForNodeConfigTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationForNodeConfigTest.java
deleted file mode 100644
index 1486522ca7..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationForNodeConfigTest.java
+++ /dev/null
@@ -1,85 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.config.api.Configuration;
-import org.onap.config.api.ConfigurationChangeListener;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Properties;
-
-/**
- * Scenario 15
- * Update and Verify Change Notifications for any change in the registered key for node specific configuration
- * Pre-requisite - set -Dnode.config.location=${"user.home"}/TestResources/ while running test
- * Created by sheetalm on 10/17/2016.
- */
-public class NotificationForNodeConfigTest {
- public final static String NAMESPACE = "NotificationForNodeConfig";
-
- private String updatedValue = null;
-
- @Before
- public void setUp() throws IOException {
- String data = "{name:\"SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @Test
- public void testNotificationForNode() throws IOException, InterruptedException {
- Configuration config = ConfigurationManager.lookup();
-
- System.out.println(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- Properties props = new Properties();
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "30");
- props.setProperty("_config.namespace",NAMESPACE);
- File f = new File(TestUtil.jsonSchemaLoc + "config.properties");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Node Config Property");
- }
-
- Thread.sleep(35000);
-
- //Verify property from node specific configuration
- Assert.assertEquals("30", config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- config.addConfigurationChangeListener(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, new NodePropValListener());
-
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "80");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Updated Node Config Property");
- }
-
- Thread.sleep(35000);
-
- //Verify change listenere is invoked when node specific configuration is changed.
- Assert.assertEquals("80", updatedValue);
-
- }
-
- private class NodePropValListener implements ConfigurationChangeListener {
- @Override
- public void notify(String key, Object oldValue, Object newValue) {
- System.out.println("received notification::oldValue=="+oldValue+" newValue=="+newValue);
- updatedValue = newValue.toString();
- }
- }
-
- @After
- public void tearDown() throws Exception {
- TestUtil.cleanUp();
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- if(f.exists()) {
- f.delete();
- }
- }
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationOnPropValTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationOnPropValTest.java
deleted file mode 100644
index ca8e812ef4..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/NotificationOnPropValTest.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.config.api.Configuration;
-import org.onap.config.api.ConfigurationChangeListener;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Properties;
-
-/**
- * Pre-requisite - set -Dconfig.location=${"user.home"}/TestResources/ while running test
- * Scenario 14 - Verify Change Notifications for any change in the registered key
- * Created by sheetalm on 10/14/2016.
- */
-public class NotificationOnPropValTest {
-
- public final static String NAMESPACE = "NotificationOnPropVal";
-
- private String updatedValue = null;
-
- @Before
- public void setUp() throws IOException {
- String data = "{name:\"SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @Test
- public void testNotification() throws IOException, InterruptedException {
- Configuration config = ConfigurationManager.lookup();
-
- System.out.println(config.getAsString(NAMESPACE,ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- config.addConfigurationChangeListener(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, new PropValListener());
-
- Properties props = new Properties();
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "20");
- props.setProperty("_config.namespace",NAMESPACE);
- props.setProperty("_config.mergeStrategy","override");
- File f = new File(TestUtil.jsonSchemaLoc + "config.properties");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Override Config Property at Conventional Resource");
- }
-
- Thread.sleep(35000);
-
- System.out.println(config.getAsString(NAMESPACE,ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- Assert.assertEquals("20" , updatedValue);
- }
-
- private class PropValListener implements ConfigurationChangeListener {
- @Override
- public void notify(String key, Object oldValue, Object newValue) {
- System.out.println("received notification::oldValue=="+oldValue+" newValue=="+newValue);
- updatedValue = newValue.toString();
- }
- }
-
- @After
- public void tearDown() throws Exception {
- TestUtil.cleanUp();
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- if(f.exists()) {
- f.delete();
- }
- }
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ResourceChangeNotificationTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ResourceChangeNotificationTest.java
deleted file mode 100644
index 4547e49d95..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ResourceChangeNotificationTest.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.config.api.Configuration;
-import org.onap.config.api.ConfigurationChangeListener;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Scenario 7
- * Test to Validate notification on changes to the underlying source
- * Resource here is GeneratorsList.json ehich is created in test itself
- */
-
-public class ResourceChangeNotificationTest {
-
- String newValue = null;
-
- public final static String NAMESPACE = "Notification";
-
- @Before
- public void setUp() throws IOException {
- String data = "{name:\"SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @Test
- public void testNotification() throws IOException, InterruptedException {
- Configuration config = ConfigurationManager.lookup();
- config.addConfigurationChangeListener(NAMESPACE,ConfigTestConstant.ARTIFACT_JSON_SCHEMA, new MyListener());
- updateJsonInFile();
- Thread.sleep(35000);
- String newValue = config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_JSON_SCHEMA);
-
- Assert.assertEquals("{name:\"updated SCM\"}",newValue);
-
- Assert.assertEquals( "14",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH ));
-
- Assert.assertEquals( "a-zA-Z", config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_UPPER ));
-
- String artifactConsumer = config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_CONSUMER );
- Assert.assertEquals(artifactConsumer,config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_CONSUMER_APPC ));
-
- List<String> expectedExtList = new ArrayList<String>();
- expectedExtList.add("pdf"); expectedExtList.add("zip"); expectedExtList.add("xml");
- List<String> extList = config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_EXT);
- Assert.assertEquals(expectedExtList, extList);
-
- List<String> expectedEncList = new ArrayList<String>();
- expectedEncList.add("Base64"); expectedEncList.add("MD5");
- List<String> encList = config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_ENC);
- Assert.assertEquals(expectedEncList, encList);
-
- List<String> expectedLocList = new ArrayList<String>();
- expectedLocList.add("/opt/spool"); expectedLocList.add(System.getProperty("user.home")+"/asdc");
- List<String> locList = config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_LOC);
- Assert.assertEquals(expectedLocList, locList);
-
- Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_XML_SCHEMA));
- }
-
- class MyListener implements ConfigurationChangeListener{
- @Override
- public void notify(String key, Object oldValue, Object newValue) {
- System.out.println("received notification::oldValue=="+oldValue+" newValue=="+newValue);
- }
- }
-
- private void updateJsonInFile() throws IOException{
- String data = "{name:\"updated SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @After
- public void tearDown() throws Exception {
- TestUtil.cleanUp();
- }
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/UnregisterNotificationTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/UnregisterNotificationTest.java
deleted file mode 100644
index 687df0e935..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/UnregisterNotificationTest.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.config.api.Configuration;
-import org.onap.config.api.ConfigurationChangeListener;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Properties;
-
-/**
- * Pre-requisite - set -Dconfig.location=${"user.home"}/TestResources/ while running test
- * Created by sheetalm on 10/19/2016.
- * Scenario 24
- * Unregister notification and verify listener
- */
-public class UnregisterNotificationTest {
- public final static String NAMESPACE = "UnregisterNotification";
-
- private String updatedValue = null;
-
- @Before
- public void setUp() throws IOException {
- String data = "{name:\"SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @Test
- public void testNotification() throws IOException, InterruptedException {
- Configuration config = ConfigurationManager.lookup();
-
- System.out.println(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- PropertyListener propListener = new PropertyListener();
- config.addConfigurationChangeListener(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH,propListener);
-
- updateValue("20");
-
- Thread.sleep(35000);
-
- System.out.println(config.getAsString(NAMESPACE,ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- //Verify listener is invoked and updated value to 20
- Assert.assertEquals("20" , updatedValue);
-
- config.removeConfigurationChangeListener(NAMESPACE,ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH,propListener);
-
- updateValue("22");
-
- Thread.sleep(35000);
-
- //When listener is unregistered updating value does not invoke any listener and value from listener should remain unchanged
- Assert.assertEquals("20" , updatedValue);
-
- //Verify value is updated even if listener is unregistered
- Assert.assertEquals("22" , config.getAsString(NAMESPACE,ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
- }
-
- private void updateValue(String newValue) throws IOException {
- Properties props = new Properties();
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, newValue);
- props.setProperty("_config.namespace",NAMESPACE);
- props.setProperty("_config.mergeStrategy","override");
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Override Config Property at Conventional Resource");
- }
- }
-
- private class PropertyListener implements ConfigurationChangeListener {
- @Override
- public void notify(String key, Object oldValue, Object newValue) {
- System.out.println("received notification::oldValue=="+oldValue+" newValue=="+newValue);
- updatedValue = newValue.toString();
- }
- }
-
- @After
- public void tearDown() throws Exception {
- TestUtil.cleanUp();
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- if(f.exists()) {
- f.delete();
- }
- }
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ValidateNodeConfigTest.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ValidateNodeConfigTest.java
deleted file mode 100644
index c3f8719de9..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/test/ValidateNodeConfigTest.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.onap.config.test;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.config.api.Configuration;
-import org.onap.config.api.ConfigurationManager;
-import org.onap.config.util.ConfigTestConstant;
-import org.onap.config.util.TestUtil;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.Properties;
-
-/**
- * Scenario 13
- * Validate node specific configuration
- * Pre-requisite - set -Dnode.config.location=${"user.home"}/TestResources/ while running test
- *
- * Created by sheetalm on 10/14/2016.
- */
-public class ValidateNodeConfigTest {
-
- public final static String NAMESPACE = "ValidateNodeConfig";
-
- @Before
- public void setUp() throws IOException {
- String data = "{name:\"SCM\"}";
- TestUtil.writeFile(data);
- }
-
- @Test
- public void testValidateNodeConfig() throws IOException, InterruptedException {
- Configuration config = ConfigurationManager.lookup();
-
- Properties props = new Properties();
- props.setProperty(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH, "56");
- props.setProperty("_config.namespace","ValidateNodeConfig");
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- try (OutputStream out = new FileOutputStream(f)) {
- props.store(out, "Node Config Property");
- }
-
- System.out.println(System.getProperty("node.config.location"));
-
- Thread.sleep(35000);
-
- //Verify property from node specific configuration
- Assert.assertEquals("56", config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
-
- //Verify if property is not in node specific then fetch from namespace
- //Assert.assertEquals("a-zA-Z",config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_UPPER));
-
- //Verify if property is not in node specific and namespace then fetch from global
- Assert.assertEquals("1024", config.getAsString(NAMESPACE, "maxCachedBufferSize"));
-
- //Deleting node configurations to test property is fetched from namespace configuration when node configuration is not present
- if(f.exists()) {
- boolean isDeleted = f.delete();
- System.out.println(isDeleted);
- }
-
- Thread.sleep(35000);
-
- Assert.assertEquals(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH), "14");
- }
-
- @After
- public void tearDown() throws Exception {
- TestUtil.cleanUp();
- File f = new File(TestUtil.jsonSchemaLoc+"config.properties");
- if(f.exists()) {
- f.delete();
- }
- }
-
-}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.json b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.json
deleted file mode 100644
index 7075a6a531..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "artifact": {
- "name": {
- "minlength": "6"
- },
- "extension": "pdf,tgz,xls"
- },
- "_config": {
- "namespace": "DynamicConfiguration",
- "mergeStrategy": "union"
- }
-} \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.properties b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.properties
deleted file mode 100644
index c3825487a9..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-artifact.name.maxlength=14
-artifact.extension=pdf, zip, xml
-artifact.supportedEncryption=Base64
-artifact.supportedEncryption=MD5
-artifact.name.allowedChar=a-zA-Z
-artifact.name.allowedchar=a-zA-Z
-artifact.status=deleted
-artifact.status=Deleted
-artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
-artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
-artifact.consumerAPPC=${artifact.consumer}
-_config.namespace=DynamicConfiguration \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.xml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.xml
deleted file mode 100644
index 4ad707d21f..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
- <artifact>
- <name>
- <maxlength>28</maxlength>
- </name>
- <extension>gz,tgz</extension>
- <supportedencryption>Base64</supportedencryption>
- <status>deleted</status>
- <mandatory>
- <name>true</name>
- </mandatory>
- <_config>
- <namespace>DynamicConfiguration</namespace>
- <mergeStrategy>merge</mergeStrategy>
- </_config>
- </artifact>
-</configuration> \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.yaml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.yaml
deleted file mode 100644
index 12ba1f093e..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/DynamicConfiguration/config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-artifact:
- name:
- allowedChar: "a-zA-Z_0-9"
-encoded: true
-consumer: "appc,catalog"
-_config:
- namespace: "DynamicConfiguration"
- mergeStrategy: "override"
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/Notification/config.properties b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/Notification/config.properties
deleted file mode 100644
index 4076eefa58..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/Notification/config.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-artifact.name.maxlength=14
-artifact.consumer=APPC
-artifact.maxsize=1048
-artifact.extension=pdf,zip,xml
-artifact.supportedEncryption=Base64
-artifact.supportedEncryption=MD5
-artifact.name.allowedChar=a-zA-Z
-artifact.name.allowedchar=a-zA-Z
-artifact.status=deleted
-artifact.status=Deleted
-artifact.persistLocation=/opt/spool,${sys:user.home}/asdc
-artifact.jsonSchema=@${sys:user.home}/TestResources/GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
-artifact.consumerAPPC=${artifact.consumer}
-_config.namespace=Notification \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig.zip b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig.zip
deleted file mode 100644
index 42d14a64db..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig.zip
+++ /dev/null
Binary files differ
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.json b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.json
deleted file mode 100644
index cc6a033b70..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "artifact": {
- "name": {
- "minlength": "6"
- },
- "extension": "pdf,tgz,xls"
- },
- "_config": {
- "namespace": "NotificationForNodeConfig",
- "mergestrategy": "union"
- }
-} \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.properties b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.properties
deleted file mode 100644
index d2c41aa4b5..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-artifact.name.maxlength=14
-artifact.extension=pdf, zip, xml
-artifact.supportedEncryption=Base64
-artifact.supportedEncryption=MD5
-artifact.name.allowedChar=a-zA-Z
-artifact.name.allowedchar=a-zA-Z
-artifact.status=deleted
-artifact.status=Deleted
-artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
-artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
-artifact.consumerAPPC=${artifact.consumer}
-_config.namespace=NotificationForNodeConfig
-
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.xml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.xml
deleted file mode 100644
index 7448cb0444..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
- <artifact>
- <name>
- <maxlength>28</maxlength>
- </name>
- <extension>gz,tgz</extension>
- <supportedencryption>Base64</supportedencryption>
- <status>deleted</status>
- <mandatory>
- <name>true</name>
- </mandatory>
- </artifact>
- <_config>
- <namespace>NotificationForNodeConfig</namespace>
- <mergestrategy>merge</mergestrategy>
- </_config>
-</configuration> \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.yaml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.yaml
deleted file mode 100644
index ee85a0c68d..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationForNodeConfig/config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-artifact:
- name:
- allowedChar: "a-zA-Z_0-9"
- encoded: true
- consumer: "appc,catalog"
-_config:
- namespace: "NotificationForNodeConfig"
- mergestrategy: "override" \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config-NS.properties b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config-NS.properties
deleted file mode 100644
index 279d407664..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config-NS.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-artifact.name.maxlength=14
-artifact.extension=pdf, zip, xml
-artifact.supportedEncryption=Base64
-artifact.supportedEncryption=MD5
-artifact.name.allowedChar=a-zA-Z
-artifact.name.allowedchar=a-zA-Z
-artifact.status=deleted
-artifact.status=Deleted
-artifact.persistLocation=/opt/spool, ${sys:user.home}/asdc
-artifact.jsonSchema=@GeneratorsList.json
-artifact.xmlSchema=@${env:path}/myschema.json
-artifact.consumerAPPC=${artifact.consumer}
-_config.namespace=NotificationOnPropVal \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.json b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.json
deleted file mode 100644
index 1027e072cc..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "artifact": {
- "name": {
- "minlength": "6"
- },
- "extension": "pdf,tgz,xls"
- },
- "_config": {
- "mergeStrategy": "union",
- "namespace": "NotificationOnPropVal"
- }
-} \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.properties b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.properties
deleted file mode 100644
index 4daad19dcc..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-maxCachedBufferSize=1024
-artifact.maxsize=1024
-artifact.name.maxlength=28 \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.xml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.xml
deleted file mode 100644
index cb88bb3363..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configuration>
- <artifact>
- <name>
- <maxlength>28</maxlength>
- </name>
- <extension>gz,tgz</extension>
- <supportedencryption>Base64</supportedencryption>
- <status>deleted</status>
- <mandatory>
- <name>true</name>
- </mandatory>
- </artifact>
- <_config>
- <namespace>NotificationOnPropVal</namespace>
- <mergeStrategy>merge</mergeStrategy>
- </_config>
-</configuration> \ No newline at end of file
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.yaml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.yaml
deleted file mode 100644
index 7283df4ecb..0000000000
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/NotificationOnPropVal/config.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-
- artifact:
- name:
- allowedChar: "a-zA-Z_0-9"
- encoded: true
- consumer: "appc,catalog"
- _config:
- mergeStrategy: "override"
- namespace: "NotificationOnPropVal" \ No newline at end of file