From a8a5863cfb100d4cbbecd0aefe5512234e101d97 Mon Sep 17 00:00:00 2001 From: vasraz Date: Thu, 30 Dec 2021 13:59:00 +0000 Subject: Remove vulnerable dependency Signed-off-by: Vasyl Razinkov Change-Id: Ic8283d37a0c4c5c4f4d30016525b819a56401c5e Issue-ID: SDC-3820 --- .../org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java | 9 ++++----- .../org/onap/sdc/backend/ci/tests/utils/rest/ResponseParser.java | 9 ++++----- .../backend/ci/tests/utils/validation/AuditValidationUtils.java | 9 ++++----- .../ci/tests/utils/validation/ProductValidationUtils.java | 6 +++--- 4 files changed, 15 insertions(+), 18 deletions(-) (limited to 'integration-tests/src') diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java index 4bb7b61624..9f481de4bb 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/api/ComponentBaseTest.java @@ -33,8 +33,6 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; import org.apache.commons.collections.CollectionUtils; -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; import org.onap.sdc.backend.ci.tests.config.Config; import org.onap.sdc.backend.ci.tests.datatypes.ResourceReqDetails; import org.onap.sdc.backend.ci.tests.datatypes.enums.UserRoleEnum; @@ -56,7 +54,8 @@ 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.slf4j.LoggerFactory; +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; import org.testng.ITestContext; import org.testng.ITestResult; import org.testng.annotations.AfterMethod; @@ -66,7 +65,7 @@ import org.testng.annotations.BeforeSuite; public abstract class ComponentBaseTest { - protected static Logger logger = LogManager.getLogger(ComponentBaseTest.class); + protected static Logger logger = LoggerFactory.getLogger(ComponentBaseTest.class); protected static final String REPORT_FOLDER = "target" + File.separator + "ExtentReport" + File.separator + "API" + File.separator; private static final String REPORT_FILE_NAME = "SDC_CI_Extent_Report.html"; @@ -85,7 +84,7 @@ public abstract class ComponentBaseTest { } public ComponentBaseTest() { - LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory(); + LoggerContext lc = (LoggerContext) org.slf4j.LoggerFactory.getILoggerFactory(); lc.getLogger("com.thinkaurelius").setLevel(Level.INFO); lc.getLogger("com.datastax").setLevel(Level.INFO); lc.getLogger("io.netty").setLevel(Level.INFO); diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/ResponseParser.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/ResponseParser.java index 437dc684d8..e8af0b1785 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/ResponseParser.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/rest/ResponseParser.java @@ -26,8 +26,8 @@ import com.fasterxml.jackson.databind.exc.InvalidFormatException; import com.fasterxml.jackson.databind.module.SimpleModule; import com.google.gson.*; import org.apache.commons.codec.binary.Base64; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; import org.json.JSONArray; import org.json.JSONException; import org.json.simple.JSONObject; @@ -50,7 +50,6 @@ import java.io.InputStream; import java.text.ParseException; import java.util.*; - public class ResponseParser { private static final String INVARIANT_UUID = "invariantUUID"; @@ -61,7 +60,7 @@ public class ResponseParser { public static final String ORIGIN_TYPE = "originType"; public static final String TOSCA_RESOURCE_NAME = "toscaResourceName"; - static Logger logger = LogManager.getLogger(ResponseParser.class); + static Logger logger = LoggerFactory.getLogger(ResponseParser.class); public static String getValueFromJsonResponse(String response, String fieldName) { try { @@ -529,7 +528,7 @@ public class ResponseParser { interfaceDefinition = mapper.readValue(response, InterfaceDefinition.class); logger.debug(interfaceDefinition.toString()); } catch (IOException e) { - logger.debug(e); + logger.debug("Failed to convertInterfaceDefinitionResponseToJavaObject", e); } return interfaceDefinition; } diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/AuditValidationUtils.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/AuditValidationUtils.java index 762e8d97ab..152d256e01 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/AuditValidationUtils.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/AuditValidationUtils.java @@ -25,8 +25,8 @@ import com.datastax.driver.core.Row; import java.io.FileNotFoundException; import java.io.IOException; import java.util.*; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; import org.codehaus.jettison.json.JSONArray; import org.codehaus.jettison.json.JSONException; import org.codehaus.jettison.json.JSONObject; @@ -63,13 +63,12 @@ import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertTrue; public class AuditValidationUtils { - protected static Logger logger = LogManager.getLogger(AuditValidationUtils.class); + protected static Logger logger = LoggerFactory.getLogger(AuditValidationUtils.class); private static final String auditKeySpaceName = "sdcaudit"; public AuditValidationUtils() { super(); - logger = LogManager.getLogger(AuditValidationUtils.class); - + logger = LoggerFactory.getLogger(AuditValidationUtils.class); } public static String buildAuditDescription(ErrorInfo errorInfo, List errorVariablesList) { diff --git a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/ProductValidationUtils.java b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/ProductValidationUtils.java index f6b61249dd..60343eeedc 100644 --- a/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/ProductValidationUtils.java +++ b/integration-tests/src/test/java/org/onap/sdc/backend/ci/tests/utils/validation/ProductValidationUtils.java @@ -20,8 +20,8 @@ package org.onap.sdc.backend.ci.tests.utils.validation; -import org.apache.logging.log4j.Logger; -import org.apache.logging.log4j.LogManager; +import org.openecomp.sdc.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.JSONValue; @@ -44,7 +44,7 @@ import static org.testng.AssertJUnit.*; public class ProductValidationUtils { - static Logger logger = LogManager.getLogger(ProductValidationUtils.class); + static Logger logger = LoggerFactory.getLogger(ProductValidationUtils.class); public static void compareExpectedAndActualProducts(Product expectedProduct, Product actualProduct) { compareExpectedAndActualProducts(expectedProduct, actualProduct, null); -- cgit 1.2.3-korg