summaryrefslogtreecommitdiffstats
path: root/common/onap-common-configuration-management/onap-configuration-management-core/src/test
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-10-24 17:18:03 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-10-25 06:09:31 +0000
commit9125b48d8813a254d5ae14109d5bd81fd34c2f33 (patch)
treee958a82b887d4d27ca17d61f3a4445b4f58278ff /common/onap-common-configuration-management/onap-configuration-management-core/src/test
parent04a5bef1c0c8ac2bd22c416ef224d968279550ee (diff)
Removed code that stored configuration in DB
Conditionally enabled unit tests, fixed a few static analysis violations, added copyright headers. Change-Id: I46ccafc5f4397f82b86d5c51bf0452f2060f6a70 Issue-ID: SDC-1867 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'common/onap-common-configuration-management/onap-configuration-management-core/src/test')
-rwxr-xr-xcommon/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/TestCMSuite.java12
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/util/TestUtil.java29
2 files changed, 17 insertions, 24 deletions
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 c0aa693e6f..9360ce1673 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
@@ -16,7 +16,6 @@
package org.onap.config;
-import org.junit.AfterClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.onap.config.test.CLIFallbackAndLookupTest;
@@ -57,20 +56,9 @@ import org.onap.config.test.YAMLConfigTest;
NodeSpecificCliTest.class,
ValidateDefaultModeTest.class,
LoadOrderMergeAndOverrideTest.class})
-
public class TestCMSuite extends junit.framework.TestSuite {
private TestCMSuite() {
// prevent instantiation
}
-
- @AfterClass
- public static void tearDown() {
- try {
- ConfigurationUtils.executeDdlSql("truncate dox.configuration_change");
- ConfigurationUtils.executeDdlSql("truncate dox.configuration");
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
}
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/util/TestUtil.java b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/util/TestUtil.java
index 59078c2edb..c6601fd8ee 100644
--- a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/util/TestUtil.java
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/java/org/onap/config/util/TestUtil.java
@@ -1,3 +1,19 @@
+/*
+ * 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.util;
import java.io.File;
@@ -5,9 +21,7 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Assert;
-import org.onap.config.ConfigurationUtils;
import org.onap.config.api.Configuration;
import org.onap.config.api.ConfigurationManager;
@@ -21,9 +35,8 @@ public class TestUtil {
public static void writeFile(String data) throws IOException {
File dir = new File(jsonSchemaLoc);
- File file = null;
dir.mkdirs();
- file = new File(jsonSchemaLoc+"/GeneratorsList.json");
+ File file = new File(jsonSchemaLoc+"/GeneratorsList.json");
file.createNewFile();
fileWriter = new FileWriter(file);
fileWriter.write(data);
@@ -33,14 +46,6 @@ public class TestUtil {
public static void cleanUp() throws Exception {
String data = "{name:\"SCM\"}";
TestUtil.writeFile(data);
- //ConfigurationUtils.executeDdlSql("truncate dox.configuration");
- try{
- ConfigurationUtils.executeDdlSql("truncate dox.configuration_change");
- }
- catch(Exception e){
- e.printStackTrace();
- }
-
}
public static void validateConfiguraton(String nameSpace) {