summaryrefslogtreecommitdiffstats
path: root/python-dockering
diff options
context:
space:
mode:
Diffstat (limited to 'python-dockering')
-rw-r--r--python-dockering/.coveragerc21
-rw-r--r--python-dockering/dockering/core.py2
-rw-r--r--python-dockering/pom.xml18
-rw-r--r--python-dockering/tox.ini3
4 files changed, 29 insertions, 15 deletions
diff --git a/python-dockering/.coveragerc b/python-dockering/.coveragerc
new file mode 100644
index 0000000..088c2da
--- /dev/null
+++ b/python-dockering/.coveragerc
@@ -0,0 +1,21 @@
+# .coveragerc to control coverage.py
+[run]
+branch = True
+
+[report]
+# Regexes for lines to exclude from consideration
+exclude_lines =
+ # Have to re-enable the standard pragma
+ pragma: no cover
+
+ # Don't complain about missing debug-only code:
+ def __repr__
+ if self\.debug
+
+ # Don't complain if tests don't hit defensive assertion code:
+ raise AssertionError
+ raise NotImplementedError
+
+ # Don't complain if non-runnable code isn't run:
+ if 0:
+ if __name__ == .__main__.:
diff --git a/python-dockering/dockering/core.py b/python-dockering/dockering/core.py
index 9ef1ae3..d82e346 100644
--- a/python-dockering/dockering/core.py
+++ b/python-dockering/dockering/core.py
@@ -104,7 +104,7 @@ def start_container(client, container):
# TODO: Have logic to inspect response and through NonRecoverableError
# when start fails. Docker-py docs don't quickly tell me what the
# response looks like.
- response = client.start(container=container["Id"])
+ client.start(container=container["Id"])
utils.logger.info("Container started: {0}".format(container["Id"]))
# TODO: Maybe check stats?
diff --git a/python-dockering/pom.xml b/python-dockering/pom.xml
index afc39a8..0933bcb 100644
--- a/python-dockering/pom.xml
+++ b/python-dockering/pom.xml
@@ -26,27 +26,21 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>org.onap.dcaegen2.utils</groupId>
- <artifactId>onap-dcae-dockering</artifactId>
+ <artifactId>python-dockering</artifactId>
<name>dcaegen2-utils-python-dockering</name>
<version>1.0.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <sonar.skip>true</sonar.skip>
- <!-- customize the SONARQUBE URL -->
- <!-- sonar.host.url>http://localhost:9000</sonar.host.url -->
- <!-- below are language dependent -->
- <!-- for Python -->
+
+ <sonar.sources>.</sonar.sources>
+ <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
+ <sonar.python.coverage.reportPath>coverage.xml</sonar.python.coverage.reportPath>
<sonar.language>py</sonar.language>
<sonar.pluginName>Python</sonar.pluginName>
<sonar.inclusions>**/*.py</sonar.inclusions>
- <!-- for JavaScaript -->
- <!--
- <sonar.language>js</sonar.language>
- <sonar.pluginName>JS</sonar.pluginName>
- <sonar.inclusions>**/*.js</sonar.inclusions>
- -->
+ <sonar.exclusions>tests/*</sonar.exclusions>
</properties>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
diff --git a/python-dockering/tox.ini b/python-dockering/tox.ini
index 987b009..280cf78 100644
--- a/python-dockering/tox.ini
+++ b/python-dockering/tox.ini
@@ -4,8 +4,7 @@ envlist = py27,py35
[testenv]
deps=
- -rrequirements.txt
pytest
coverage
pytest-cov
-commands=pytest --junitxml xunit-results.xml --cov {envsitepackagesdir} --cov-report=xml
+commands=pytest --junitxml xunit-results.xml --cov {envsitepackagesdir}/dockering --cov-report=xml