aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLusheng Ji <lji@research.att.com>2018-02-19 22:29:52 -0500
committerLusheng Ji <lji@research.att.com>2018-02-20 04:19:19 +0000
commita9410b87464aab3bac170b63de245753dc93174e (patch)
treeada13095d3b5e38da66f104e9385b78fe3b592be
parent3a3543f74d74d4410c3e4d414bebf3d1daba5a59 (diff)
Fix Sonar reporting
Change-Id: Iebb1314eab1d238f723e3f55803a7a32c317d77c Signed-off-by: Lusheng Ji <lji@research.att.com> Issue-ID: DCAEGEN2-355
-rw-r--r--pom.xml9
-rw-r--r--tests/__init__.py21
-rw-r--r--tox.ini6
3 files changed, 25 insertions, 11 deletions
diff --git a/pom.xml b/pom.xml
index 8edefe4..3f4a09d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,18 +36,9 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<!-- sonar -->
<sonar.skip>false</sonar.skip>
<sonar.sources>.</sonar.sources>
- <sonar.junit.reportspath>xunit-reports/xunit-result-configbinding.xml</sonar.junit.reportspath>
- <!--
- <sonar.python.coverage.reportpath>coverage.xml</sonar.python.coverage.reportpath>
- see https://docs.sonarqube.org/display/plug/python+coverage+results+import
- ant pattern describing the path to coverage reports, relative to projects root. leave unset to use the default ("coverage-reports/coverage-*.xml").
- -->
<sonar.language>py</sonar.language>
<sonar.pluginname>python</sonar.pluginname>
<sonar.inclusions>config_binding_service/**.py</sonar.inclusions>
- <sonar.host.url>http://135.205.228.63:9000</sonar.host.url>
-
-
</properties>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..1875bf6
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1,21 @@
+# ================================================================================
+# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+# ================================================================================
+# 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.
+# ============LICENSE_END=========================================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+
+
+# empty __init__.py so that pytest can add correct path to coverage report, -- per pytest
+# best practice guideline
diff --git a/tox.ini b/tox.ini
index aeadddf..7ba18f6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
# content of: tox.ini , put in same dir as setup.py
[tox]
-envlist = py27,py36
+envlist = py36
[testenv]
deps=
@@ -11,4 +11,6 @@ deps=
setenv =
CONSUL_HOST = 8.8.8.8
HOSTNAME = config_binding_service
-commands=pytest --junitxml xunit-reports/xunit-result-configbinding.xml --cov {envsitepackagesdir}/config_binding_service --cov-report=xml
+commands=
+ #pytest --cov {envsitepackagesdir}/config_binding_service --cov-report=xml tests --verbose
+ pytest --verbose --cov config_binding_service --cov-report=xml --cov-report=term tests