summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-07-26 12:43:00 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-07-28 11:34:23 +0200
commit9ee9b136ebec5d21f5165acc5e4441c3e91a56dd (patch)
tree4495625f916c4004b9d36a5d57ee3b34c2538e0b
parent3e0300e8f9695348aa4564f87a23ac3c0cf737ff (diff)
Add doctor-test package
It also updates test-requirements.txt to conform with OpenStack stable/ocata and renames it requirements.txt. tests.main:main is considered as entry point and run.sh as script. run.sh could be renamed to avoid possible conflicts in functest. tox.ini is updated to pin the right versions and build files are filtered. The next dependencies can be safely removed: - paramiko - scp - python-openstackclient - python-ceilometerclient - virtualenv Change-Id: I2091cfe4751640bf83d77e1fdd713af1e31fa89d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rw-r--r--.gitignore3
-rw-r--r--requirements.txt14
-rw-r--r--setup.cfg13
-rw-r--r--setup.py22
-rw-r--r--test-requirements.txt14
-rw-r--r--tests/__init__.py0
-rw-r--r--tests/main.py4
-rw-r--r--tox.ini10
8 files changed, 58 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index 84d085d..83868b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,9 @@
*.pyc
.*.sw?
**.log
+*.pyc
+/*.egg-info/
+/build/
/docs_build/
/docs_output/
/releng/
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..4623289
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,14 @@
+Flask!=0.11,<1.0,>=0.10 # BSD
+paramiko>=2.0 # LGPLv2.1+
+scp
+requests!=2.12.2,>=2.10.0 # Apache-2.0
+oslo.config!=3.18.0,>=3.14.0 # Apache-2.0
+python-openstackclient>=3.3.0 # Apache-2.0
+python-ceilometerclient>=2.5.0 # Apache-2.0
+aodhclient>=0.7.0 # Apache-2.0
+python-keystoneclient>=3.8.0 # Apache-2.0
+python-neutronclient>=5.1.0 # Apache-2.0
+python-novaclient!=7.0.0,>=6.0.0 # Apache-2.0
+python-congressclient<2000,>=1.3.0 # Apache-2.0
+python-glanceclient>=2.5.0 # Apache-2.0
+virtualenv>=13.1.0 # MIT
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..d294cf3
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,13 @@
+[metadata]
+name = doctor-test
+version = 2017.9.0
+home-page = https://wiki.opnfv.org/display/doctor/Doctor+Home
+
+[files]
+packages = tests
+scripts =
+ tests/run.sh
+
+[entry_points]
+console_scripts =
+ doctor-test = tests.main:main
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..a1e9b3b
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2017 Orange and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+
+import setuptools
+
+# In python < 2.7.4, a lazy loading of package `pbr` will break
+# setuptools if some other modules registered functions in `atexit`.
+# solution from: http://bugs.python.org/issue15881#msg170215
+try:
+ import multiprocessing # noqa
+except ImportError:
+ pass
+
+setuptools.setup(
+ setup_requires=['pbr>=1.8'],
+ pbr=True)
diff --git a/test-requirements.txt b/test-requirements.txt
deleted file mode 100644
index 070caa4..0000000
--- a/test-requirements.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-Flask==0.10.1
-paramiko==1.16.0
-scp==0.10.2
-requests>=2.8.0
-oslo.config==3.22.0 # Apache-2.0
-python-openstackclient==2.3.0
-python-ceilometerclient==2.6.2
-aodhclient==0.7.0
-python-keystoneclient==3.5.0
-python-neutronclient==6.0.0
-python-novaclient==6.0.0
-python-congressclient==1.5.0
-python-glanceclient==2.5.0
-virtualenv==15.1.0
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/__init__.py
diff --git a/tests/main.py b/tests/main.py
index 797e28b..7714d7d 100644
--- a/tests/main.py
+++ b/tests/main.py
@@ -92,7 +92,3 @@ def main():
doctor = DoctorTest(conf)
doctor.run()
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/tox.ini b/tox.ini
index e75a374..c6262ed 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,9 +4,12 @@ envlist = py34
skipsdist = True
[testenv]
-install_command = pip install -U {opts} {packages}
+usedevelop = True
+install_command = pip install \
+ -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata \
+ {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
-deps = -r{toxinidir}/test-requirements.txt
+deps = -r{toxinidir}/requirements.txt
passenv =
OS_AUTH_URL
OS_USERNAME
@@ -21,5 +24,4 @@ passenv =
PYTHON_ENABLE
CI_DEBUG
changedir = {toxinidir}/tests
-commands = python main.py
-
+commands = doctor-test