aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/src/test
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2021-07-27 16:36:13 -0400
committerTaka Cho <takamune.cho@att.com>2021-08-05 13:58:43 -0400
commit4aa0eb0bae6353408e9a82d8f07af1703ccaf9d3 (patch)
tree4aa872889cc53d276e49a2130b2eb688d06c27a1 /runtime/src/test
parent931424fc681b1d41afbba98a190253283f9a6eba (diff)
Use slf4j instead of EELFLogger in Clamp
replace EELF with slf4j logback using slf4j Marker from common repo Issue-ID: POLICY-3087 Change-Id: I56b43584b1603d9eba642c1cd6ef6190526d078b Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'runtime/src/test')
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java10
-rw-r--r--runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java1
-rw-r--r--runtime/src/test/resources/application.properties3
-rw-r--r--runtime/src/test/resources/https/https-test.properties7
-rw-r--r--runtime/src/test/resources/logback.xml6
-rw-r--r--runtime/src/test/resources/robotframework/robotframework-test.properties5
6 files changed, 12 insertions, 20 deletions
diff --git a/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java b/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
index ad7efed36..66c7f3589 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/clds/it/RobotItCase.java
@@ -25,8 +25,6 @@ package org.onap.policy.clamp.clds.it;
import static org.apache.commons.io.FileUtils.copyInputStreamToFile;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
import com.github.dockerjava.api.DockerClient;
import com.github.dockerjava.api.command.BuildImageResultCallback;
import com.github.dockerjava.api.command.CreateContainerResponse;
@@ -46,6 +44,8 @@ import org.codehaus.plexus.util.FileUtils;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
@@ -61,7 +61,7 @@ public class RobotItCase {
@Value("${server.port}")
private String httpPort;
private static final int TIMEOUT_S = 150;
- protected static final EELFLogger logger = EELFManager.getInstance().getLogger(RobotItCase.class);
+ protected static final Logger logger = LoggerFactory.getLogger(RobotItCase.class);
@Test
public void robotTests() throws Exception {
@@ -105,7 +105,7 @@ public class RobotItCase {
exec = client.inspectContainerCmd(id).exec();
tries++;
} while (exec.getState().getRunning() && tries < TIMEOUT_S);
- logger.info("RobotFramework result:" + exec.getState());
+ logger.info("RobotFramework result: {}", exec.getState());
LogContainerCmd logContainerCmd = client.logContainerCmd(id);
logContainerCmd.withStdOut(true).withStdErr(true);
@@ -128,7 +128,7 @@ public class RobotItCase {
new File("target/robotframework/report.html"));
client.stopContainerCmd(id);
- logger.info("RobotFramework output.xml file: " + FileUtils.fileRead("target/robotframework/output.xml"));
+ logger.info("RobotFramework output.xml file: {}", FileUtils.fileRead("target/robotframework/output.xml"));
Assert.assertEquals(exec.getState().getError(), 0L,
Objects.requireNonNull(exec.getState().getExitCodeLong()).longValue());
diff --git a/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java b/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java
index 4b93ed7be..f3ca978e7 100644
--- a/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java
+++ b/runtime/src/test/java/org/onap/policy/clamp/clds/util/LoggingUtilsTest.java
@@ -22,6 +22,7 @@
package org.onap.policy.clamp.clds.util;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
diff --git a/runtime/src/test/resources/application.properties b/runtime/src/test/resources/application.properties
index 54a89078d..bc0c290db 100644
--- a/runtime/src/test/resources/application.properties
+++ b/runtime/src/test/resources/application.properties
@@ -124,8 +124,7 @@ async.core.pool.size=10
async.max.pool.size=20
async.queue.capacity=500
-#For EELF logback file
-#com.att.eelf.logging.path=
+#For logback file
clamp.config.logback.filename=logback-default.xml
#The log folder that will be used in logback.xml file
clamp.config.log.path=log
diff --git a/runtime/src/test/resources/https/https-test.properties b/runtime/src/test/resources/https/https-test.properties
index 14079a78e..19069cebc 100644
--- a/runtime/src/test/resources/https/https-test.properties
+++ b/runtime/src/test/resources/https/https-test.properties
@@ -102,9 +102,8 @@ camel.springboot.backlog-tracing=true
camel.springboot.tracing=true
camel.springboot.message-history=true
-#For EELF logback file
-#com.att.eelf.logging.path=
-com.att.eelf.logging.file=logback-default.xml
+#For logback file
+clamp.config.logback.filename=logback-default.xml
#The log folder that will be used in logback.xml file
clamp.config.log.path=log
@@ -132,4 +131,4 @@ clamp.config.cadi.oauthTokenUrl= https://AAF_LOCATE_URL/locate/onap.org.osaaf.aa
clamp.config.cadi.oauthIntrospectUrll=https://AAF_LOCATE_URL/locate/onap.org.osaaf.aaf.introspect:2.1/introspect
clamp.config.cadi.aafEnv=DEV
clamp.config.cadi.aafUrl=https://AAF_LOCATE_URL/onap.org.osaaf.aaf.service:2.1
-clamp.config.cadi.cadiX509Issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US \ No newline at end of file
+clamp.config.cadi.cadiX509Issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_7, OU=OSAAF, O=ONAP, C=US:CN=intermediateCA_9, OU=OSAAF, O=ONAP, C=US
diff --git a/runtime/src/test/resources/logback.xml b/runtime/src/test/resources/logback.xml
index 97a8982a9..d4cec3851 100644
--- a/runtime/src/test/resources/logback.xml
+++ b/runtime/src/test/resources/logback.xml
@@ -71,12 +71,6 @@
<!-- CLDS related loggers -->
<logger
- name="com.att.eelf.error"
- level="OFF">
- <appender-ref ref="STDOUT" />
- </logger>
-
- <logger
name="ch.qos.logback.classic"
level="INFO" >
<appender-ref ref="STDOUT" />
diff --git a/runtime/src/test/resources/robotframework/robotframework-test.properties b/runtime/src/test/resources/robotframework/robotframework-test.properties
index fed074198..499719aa6 100644
--- a/runtime/src/test/resources/robotframework/robotframework-test.properties
+++ b/runtime/src/test/resources/robotframework/robotframework-test.properties
@@ -121,8 +121,7 @@ async.core.pool.size=10
async.max.pool.size=20
async.queue.capacity=500
-#For EELF logback file
-#com.att.eelf.logging.path=
+#For logback file
clamp.config.logback.filename=logback-default.xml
#The log folder that will be used in logback.xml file
clamp.config.log.path=log
@@ -177,4 +176,4 @@ clamp.config.cds.password=ccsdkapps
## Tosca converter
clamp.config.tosca.converter.json.schema.templates=classpath:/clds/tosca-converter/templates.json
clamp.config.tosca.converter.default.datatypes=classpath:/clds/tosca-converter/default-tosca-types.yaml
-clamp.config.tosca.converter.dictionary.support.enabled=true \ No newline at end of file
+clamp.config.tosca.converter.dictionary.support.enabled=true