summaryrefslogtreecommitdiffstats
path: root/ice-server
diff options
context:
space:
mode:
Diffstat (limited to 'ice-server')
-rw-r--r--ice-server/heat_test/app.py20
-rw-r--r--ice-server/heat_test/test/test_api.py2
-rw-r--r--ice-server/pom.xml11
-rw-r--r--ice-server/setup.py4
-rw-r--r--ice-server/tox.ini10
5 files changed, 16 insertions, 31 deletions
diff --git a/ice-server/heat_test/app.py b/ice-server/heat_test/app.py
index e982c68..c61150a 100644
--- a/ice-server/heat_test/app.py
+++ b/ice-server/heat_test/app.py
@@ -7,25 +7,6 @@ import connexion
from connexion.resolver import RestyResolver
-def parse_args():
- """
- parse argument parameters
- """
- parser = argparse.ArgumentParser(description='start the heat validation rest server')
- parser.add_argument("--debug", help="increase output verbosity")
- parser.add_argument("-p", "--port", type=int, help="listen port (default 5000)", default=5000)
- args = parser.parse_args()
- if args.debug:
- logging.info("debug mode")
- debug = True
- else:
- debug = False
- if args.port:
- port = args.port
- else:
- port = 5000
-
-
def create_app():
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
app = connexion.App(__name__, specification_dir='swagger/')
@@ -37,6 +18,7 @@ def create_app():
return app
+
def create_test_app():
print("create_test_app")
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
diff --git a/ice-server/heat_test/test/test_api.py b/ice-server/heat_test/test/test_api.py
index 259a43b..25f017b 100644
--- a/ice-server/heat_test/test/test_api.py
+++ b/ice-server/heat_test/test/test_api.py
@@ -15,7 +15,7 @@ print(sys.path)
import app as myapp
-ICE_URL = '/ice/'
+ICE_URL = '/onapapi/ice/v1/'
flask_app = myapp.create_test_app()
diff --git a/ice-server/pom.xml b/ice-server/pom.xml
index 3e6d2a5..26f8495 100644
--- a/ice-server/pom.xml
+++ b/ice-server/pom.xml
@@ -30,9 +30,12 @@ under the License.
<name>ice rest API</name>
<description>rest API for HEAT template validation</description>
<properties>
- <sonar.language>py</sonar.language>
- <sonar.pluginName>Python</sonar.pluginName>
- <sonar.inclusions>**/*.py</sonar.inclusions>
- <sonar.skip>false</sonar.skip>
+ <sonar.sources>.</sonar.sources>
+ <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>
+ <sonar.exclusions>version.py,setup.py</sonar.exclusions>
</properties>
+
</project>
diff --git a/ice-server/setup.py b/ice-server/setup.py
index b4c5aea..eacf048 100644
--- a/ice-server/setup.py
+++ b/ice-server/setup.py
@@ -20,8 +20,8 @@ import os
from setuptools import setup, find_packages
import sys
-if sys.version_info < (2, 7):
- sys.exit('VNF SDK requires Python 2.7+')
+if sys.version_info < (3, 0):
+ sys.exit('VNF SDK requires Python 3.0+')
root_dir = os.path.dirname(__file__)
install_requires = []
diff --git a/ice-server/tox.ini b/ice-server/tox.ini
index 8da170d..afae937 100644
--- a/ice-server/tox.ini
+++ b/ice-server/tox.ini
@@ -40,14 +40,14 @@
[tox]
skipsdist=True
-envlist = py3
+envlist = py35
[testenv]
distribute = False
commands =
{envpython} --version
- pytest
+ coverage run --module pytest heat_test
+ coverage xml
deps = -rrequirements.txt
-
-[testenv:py3]
-basepython=python3.5
+ coverage
+ pytest-cov