summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-10-25 09:44:35 +0000
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-10-28 06:59:03 +0000
commit313e73a58a9a01bbceb007b6de617fda521bdd6e (patch)
tree7a9fd4d746b3d6b1b38025b43d581a5bb8c4f768
parent933cdbd4c20f18fe47f253bd721baf6ae996e906 (diff)
Enabled unit tests of configuration framework
Added slf4j binding for tests. Updated patch version of commons-configuration. Change-Id: Ifef09eb3591f01be4f90f16758448018361dcdb7 Issue-ID: SDC-1867 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
-rwxr-xr-xcommon/onap-common-configuration-management/onap-configuration-management-core/pom.xml12
-rw-r--r--common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/logback-test.xml29
2 files changed, 35 insertions, 6 deletions
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml b/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
index 7c5573c50a..c615270ead 100755
--- a/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/pom.xml
@@ -42,7 +42,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
- <version>2.1</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
@@ -110,6 +110,11 @@
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
@@ -119,11 +124,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<version>${mvn.surefire.version}</version>
<configuration>
- <!--
- For some reason running without JaCoCo causes test failures.
- Making tests depend on JaCoCo until the problem is fixed.
- -->
- <skipTests>${jacoco.skip}</skipTests>
<systemPropertyVariables>
<config.location>${project.basedir}/src/test/resources</config.location>
<node.config.location>${user.home}/TestResources</node.config.location>
diff --git a/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/logback-test.xml b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..73ffeeaf4e
--- /dev/null
+++ b/common/onap-common-configuration-management/onap-configuration-management-core/src/test/resources/logback-test.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ 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.
+ -->
+
+<configuration>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="OFF">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+</configuration> \ No newline at end of file