aboutsummaryrefslogtreecommitdiffstats
path: root/test-apis-ci/src/main/java
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2017-11-26 19:05:23 +0200
committerMichael Lando <ml636r@att.com>2017-11-27 08:49:27 +0000
commit0566f581c0f310384f42838c388f57234ed1d60e (patch)
treedd782da7ebd4ce591876865a564b9c1f65eb5e66 /test-apis-ci/src/main/java
parent4d8033eeb036943c05b3a5752b8f4cd4d705272f (diff)
sync 1.1.0 to master
Change-Id: I6e040f039895dd2ced55f95824473946b226fb5d Issue-ID: SDC-707 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'test-apis-ci/src/main/java')
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java71
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/run/StartTest.java5
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java14
-rw-r--r--test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java2
4 files changed, 38 insertions, 54 deletions
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java
index b545145be8..fcbf3b2fee 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/api/ComponentBaseTest.java
@@ -20,25 +20,15 @@
package org.openecomp.sdc.ci.tests.api;
-import static org.testng.AssertJUnit.assertEquals;
-import static org.testng.AssertJUnit.assertNotNull;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Consumer;
-import java.util.stream.Collectors;
-
+import com.aventstack.extentreports.ExtentTest;
+import com.aventstack.extentreports.Status;
+import com.thinkaurelius.titan.core.TitanFactory;
+import com.thinkaurelius.titan.core.TitanGraph;
+import com.thinkaurelius.titan.core.TitanVertex;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.ImmutableTriple;
-import org.apache.log4j.Logger;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.rules.TestName;
@@ -47,11 +37,7 @@ import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
import org.openecomp.sdc.be.datatypes.enums.ComponentTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.NodeTypeEnum;
import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
-import org.openecomp.sdc.be.model.Component;
-import org.openecomp.sdc.be.model.Product;
-import org.openecomp.sdc.be.model.Resource;
-import org.openecomp.sdc.be.model.Service;
-import org.openecomp.sdc.be.model.User;
+import org.openecomp.sdc.be.model.*;
import org.openecomp.sdc.ci.tests.config.Config;
import org.openecomp.sdc.ci.tests.datatypes.ResourceReqDetails;
import org.openecomp.sdc.ci.tests.datatypes.enums.UserRoleEnum;
@@ -61,13 +47,8 @@ import org.openecomp.sdc.ci.tests.utils.cassandra.CassandraUtils;
import org.openecomp.sdc.ci.tests.utils.general.AtomicOperationUtils;
import org.openecomp.sdc.ci.tests.utils.general.ElementFactory;
import org.openecomp.sdc.ci.tests.utils.general.FileHandling;
-import org.openecomp.sdc.ci.tests.utils.rest.BaseRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.CatalogRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.CategoryRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.ProductRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.ResourceRestUtils;
-import org.openecomp.sdc.ci.tests.utils.rest.ResponseParser;
-import org.openecomp.sdc.ci.tests.utils.rest.ServiceRestUtils;
+import org.openecomp.sdc.ci.tests.utils.rest.*;
+import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.ITestContext;
import org.testng.ITestResult;
@@ -78,20 +59,23 @@ import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
-import com.aventstack.extentreports.ExtentTest;
-import com.aventstack.extentreports.Status;
-import com.thinkaurelius.titan.core.TitanFactory;
-import com.thinkaurelius.titan.core.TitanGraph;
-import com.thinkaurelius.titan.core.TitanVertex;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.*;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNotNull;
+
+
-import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.LoggerContext;
public abstract class ComponentBaseTest {
// private static Logger logger = LoggerFactory.getLogger(ComponentBaseTest.class.getName());
-
- protected static Logger logger= Logger.getLogger(ComponentBaseTest.class);
+ protected static Logger logger= LoggerFactory.getLogger(ComponentBaseTest.class);
// public ComponentBaseTest(TestName testName, String className) {
@@ -118,12 +102,15 @@ public abstract class ComponentBaseTest {
public ComponentBaseTest(TestName name, String name2) {
// TODO Auto-generated constructor stub
- LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
- lc.getLogger("com.thinkaurelius").setLevel(Level.INFO);
- lc.getLogger("com.datastax").setLevel(Level.INFO);
- lc.getLogger("io.netty").setLevel(Level.INFO);
- lc.getLogger("c.d").setLevel(Level.INFO);
- }
+// LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
+// lc.getLogger("com.thinkaurelius").setLevel(Level.INFO);
+// lc.getLogger("com.datastax").setLevel(Level.INFO);
+// lc.getLogger("io.netty").setLevel(Level.INFO);
+// lc.getLogger("c.d").setLevel(Level.INFO);
+// lc.getLogger("o.a.h").setLevel(Level.INFO);
+// lc.getLogger("o.o.s.c.t.d.h").setLevel(Level.INFO);
+
+}
public static String getReportFolder() {
return REPORT_FOLDER;
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/run/StartTest.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/run/StartTest.java
index 9bb14d7f50..8bc967c877 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/run/StartTest.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/run/StartTest.java
@@ -34,8 +34,9 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.openecomp.sdc.ci.tests.config.Config;
import org.openecomp.sdc.ci.tests.utils.Utils;
//import org.junit.runner.JUnitCore;
@@ -94,7 +95,7 @@ public class StartTest {
}
public StartTest() {
- logger = Logger.getLogger(StartTest.class.getName());
+ logger = LoggerFactory.getLogger(StartTest.class.getName());
}
public static void enableLogger() {
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
index 8764779c02..0f339b811c 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/sanity/Onboard.java
@@ -21,9 +21,9 @@
package org.openecomp.sdc.ci.tests.sanity;
-
-
-
+import com.aventstack.extentreports.Status;
+import com.clearspring.analytics.util.Pair;
+import fj.data.Either;
import org.junit.Rule;
import org.junit.rules.TestName;
import org.openecomp.sdc.be.datatypes.enums.AssetTypeEnum;
@@ -52,11 +52,6 @@ import org.testng.annotations.Optional;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
-import com.aventstack.extentreports.Status;
-import com.clearspring.analytics.util.Pair;
-
-import fj.data.Either;
-
import java.io.File;
@@ -86,7 +81,8 @@ public class Onboard extends ComponentBaseTest {
@Test(dataProviderClass = OnboardingDataProviders.class, dataProvider = "VNF_List")
public void onboardVNFShotFlow(String filepath, String vnfFile) throws Exception, Throwable {
setLog(vnfFile);
- System.out.println("print - >" + makeDistributionValue);
+ logger.info("Onboarding - > " + vnfFile);
+// System.out.println("Onboarding - > " + vnfFile);
runOnboardToDistributionFlow(filepath, vnfFile);
}
diff --git a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java
index 7789231c22..c4b9764c96 100644
--- a/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java
+++ b/test-apis-ci/src/main/java/org/openecomp/sdc/ci/tests/utils/rest/ResponseParser.java
@@ -187,7 +187,7 @@ public class ResponseParser {
Resource resource = null;
try {
// TODO Andrey L. uncomment line below in case to ignore on unknown properties, not recommended
-// mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
resource = mapper.readValue(response, Resource.class);
logger.debug(resource.toString());