summaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authorSudarshan Kumar <sudars19@in.ibm.com>2019-06-14 15:36:35 +0530
committerSudarshan Kumar <sudars19@in.ibm.com>2019-06-14 15:37:45 +0530
commit8380744f8085be1851133f25d58f2214a85be79c (patch)
tree164da48a5db07e7ae12b2cff2ea8e9667d65c4a6 /engine
parent4d34be7b35016ff0368286003e1dffd441e88e8f (diff)
Tox Configuration for Valet-Engine
Tox Configuration for Valet-Engine Issue-ID: OPTFRA-519 Change-Id: If3f2c82dd71c2ab2d45ec0b0d71f20d8aad7d9ff Signed-off-by: Sudarshan Kumar <sudars19@in.ibm.com>
Diffstat (limited to 'engine')
-rw-r--r--engine/pom.xml13
-rw-r--r--engine/requirements.txt7
-rw-r--r--engine/src/__init__.py0
-rw-r--r--engine/src/tests/__init__.py0
-rw-r--r--engine/src/tests/data/__init__.py0
-rw-r--r--engine/src/tests/functional/__init__.py0
-rw-r--r--engine/src/tests/integration/__init__.py0
-rw-r--r--engine/src/tests/unit/__init__.py0
-rw-r--r--engine/test-requirements.txt21
-rw-r--r--engine/tox.ini64
10 files changed, 105 insertions, 0 deletions
diff --git a/engine/pom.xml b/engine/pom.xml
index 400b1ae..4150be0 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -28,6 +28,19 @@
<onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
+
+ <!-- Sonar Properties-->
+ <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
+ <sonar.sources>engine/src</sonar.sources>
+ <sonar.tests>engine/src/tests</sonar.tests>
+ <sonar.junit.reportsPath>engine/xunit-results.xml</sonar.junit.reportsPath>
+ <sonar.python.coverage.reportPath>engine/cover/coverage.xml</sonar.python.coverage.reportPath>
+ <sonar.language>py</sonar.language>
+ <sonar.pluginname>python</sonar.pluginname>
+ <sonar.inclusions>**/**.py</sonar.inclusions>
+ <sonar.exclusions>**/tests/**,setup.py,**/lib/**</sonar.exclusions>
+ <sonar.test.inclusions>**/tests/**.py</sonar.test.inclusions>
+ <sonar.test.exclusions>**/**.py,setup.py,**/lib/**</sonar.test.exclusions>
</properties>
<groupId>org.onap.fgps</groupId>
diff --git a/engine/requirements.txt b/engine/requirements.txt
new file mode 100644
index 0000000..f623b01
--- /dev/null
+++ b/engine/requirements.txt
@@ -0,0 +1,7 @@
+six==1.12.0
+Crypto==1.4.1
+requests==2.21.0
+python-novaclient==2.18.0
+python-keystoneclient==3.6.0
+pycrypto==2.6.1
+pytz==2018.9
diff --git a/engine/src/__init__.py b/engine/src/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/engine/src/__init__.py
diff --git a/engine/src/tests/__init__.py b/engine/src/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/engine/src/tests/__init__.py
diff --git a/engine/src/tests/data/__init__.py b/engine/src/tests/data/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/engine/src/tests/data/__init__.py
diff --git a/engine/src/tests/functional/__init__.py b/engine/src/tests/functional/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/engine/src/tests/functional/__init__.py
diff --git a/engine/src/tests/integration/__init__.py b/engine/src/tests/integration/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/engine/src/tests/integration/__init__.py
diff --git a/engine/src/tests/unit/__init__.py b/engine/src/tests/unit/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/engine/src/tests/unit/__init__.py
diff --git a/engine/test-requirements.txt b/engine/test-requirements.txt
new file mode 100644
index 0000000..7466c9d
--- /dev/null
+++ b/engine/test-requirements.txt
@@ -0,0 +1,21 @@
+# The order of packages is significant, because pip processes them in the order
+# of appearance. Changing the order has an impact on the overall integration
+# process, which may cause wedges in the gate later.
+
+# Hacking already pins down pep8, pyflakes and flake8
+hacking<0.11,>=0.10.0
+# bandit>=1.1.0 # Apache-2.0
+coverage>=3.6 # Apache-2.0
+fixtures>=3.0.0 # Apache-2.0/BSD
+kombu>=3.0.25 # BSD
+mock>=2.0 # BSD
+mox3>=0.7.0 # Apache-2.0
+oslotest>=1.10.0 # Apache-2.0
+testrepository>=0.0.18 # Apache-2.0/BSD
+testscenarios>=0.4 # Apache-2.0/BSD
+testtools>=1.4.0 # MIT
+os-testr>=1.0.0 # Apache-2.0
+tempest>=11.0.0 # Apache-2.0
+pifpaf>=0.0.11
+junitxml>=0.7
+requests-mock>=1.5.2
diff --git a/engine/tox.ini b/engine/tox.ini
new file mode 100644
index 0000000..dd69290
--- /dev/null
+++ b/engine/tox.ini
@@ -0,0 +1,64 @@
+[tox]
+minversion = 1.6
+skipsdist = True
+#envlist = py35,py27,functional,pep8
+envlist = py27,pep8
+[testenv]
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+install_command = pip install -U {opts} {packages}
+usedevelop = True
+setenv = VIRTUAL_ENV={envdir}
+ OS_TEST_PATH=engine/tests/unit
+passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
+#commands =
+# {toxinidir}/tools/pretty_tox.sh "{posargs}"
+# oslo-config-generator --config-file=etc/conductor/conductor-config-generator.conf
+
+whitelist_externals = bash
+ find
+
+[testenv:functional]
+setenv = VIRTUAL_ENV={envdir}
+ OS_TEST_PATH=engine/tests/functional/
+passenv = ENGINE_*
+commands =
+ bash -x {toxinidir}/run-functional-tests.sh "{posargs}"
+
+[testenv:cover]
+setenv = VIRTUAL_ENV={envdir}
+ LANGUAGE=en_US
+ OS_TEST_PATH=engine/tests/unit
+ PYTHON=coverage run --source engine --omit='*tests*' --parallel-mode
+commands =
+ coverage erase
+ find . -type f -name "*.pyc" -delete
+ find . -type f -name ".coverage.*" -delete
+ {toxinidir}/tools/pretty_tox.sh "{posargs}"
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
+ coverage report --omit=".tox/py27/*","engine/tests/*"
+
+[testenv:pep8]
+deps = hacking<0.12,>=0.11.0
+commands =
+ flake8
+
+#[testenv:genconfig]
+#commands = oslo-config-generator --config-file=etc/conductor/conductor-config-generator.conf
+
+[testenv:venv]
+commands = {posargs}
+setenv = PYTHONHASHSEED=0
+
+[testenv:debug]
+commands = bash -x oslo_debug_helper {posargs}
+
+[flake8]
+ignore = H301,E401,E226,E302,E41,E303,E501,E265,E125,E101,E131,E127,E306,
+exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,install-guide
+show-source = True
+
+#[hacking]
+#import_exceptions = conductor.common.i18n