From a4fe9f86c51ef47f47efd2aff89aab85abc7b0b4 Mon Sep 17 00:00:00 2001 From: Yushiro FURUKAWA Date: Thu, 29 Sep 2016 09:11:34 +0900 Subject: [PATCH] Use them same versions of Influx or Cassandra Versions of Influx or Cassandra between tox and devstack env were different. Now in both places OpenStack requirements are used. Additionally: - moved Influx and Cassandra to test-requirements. Change-Id: I5be1be023b605a0b7efe718796877b90f9dc06f0 Related-Bug: #1628719 --- devstack/plugin.sh | 10 +++++----- requirements.txt | 2 -- test-requirements.txt | 2 ++ tox.ini | 23 +++++++++-------------- 4 files changed, 16 insertions(+), 21 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 6b032884c..47ce1f165 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -746,7 +746,7 @@ function install_git { function download_monasca_libraries { echo_summary "Download Monasca monasca_common and monasca_statsd" - + GIT_DEPTH_OLD=$GIT_DEPTH GIT_DEPTH=0 git_clone $MONASCA_COMMON_REPO $MONASCA_COMMON_DIR $MONASCA_COMMON_BRANCH @@ -868,10 +868,10 @@ function install_monasca_api_python { pip_install gunicorn if [[ "${MONASCA_METRICS_DB,,}" == 'influxdb' ]]; then - pip_install influxdb==2.8.0 + pip_install_gr influxdb fi if [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then - pip_install cassandra-driver>=2.1.4,!=3.6.0 + pip_install_gr cassandra-driver fi if is_service_enabled postgresql; then apt_get -y install libpq-dev @@ -1105,11 +1105,11 @@ function install_monasca_persister_python { if [[ "${MONASCA_METRICS_DB,,}" == 'influxdb' ]]; then - pip_install influxdb==2.8.0 + pip_install_gr influxdb elif [[ "${MONASCA_METRICS_DB,,}" == 'cassandra' ]]; then - pip_install 'cassandra-driver>=2.1.4,!=3.6.0' + pip_install_gr cassandra-driver fi diff --git a/requirements.txt b/requirements.txt index 4ca703dd9..2583c9cf7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,8 +17,6 @@ pbr>=1.8 # Apache-2.0 six>=1.9.0 # MIT pyparsing>=2.1.0 # MIT voluptuous>=0.8.9 # BSD License -#influxdb -#cassandra-driver>=2.1.4,!=3.6.0 # Apache-2.0 eventlet!=0.18.3,>=0.18.2 # MIT simplejson>=2.2.0 # MIT monasca-common>=1.4.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 61face6fe..745413ca9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,8 +6,10 @@ bandit>=1.1.0 # Apache-2.0 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 Babel>=2.3.4 # BSD coverage>=4.0 # Apache-2.0 +cassandra-driver>=2.1.4,!=3.6.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD httplib2>=0.7.5 # MIT +influxdb>=2.9.2 # MIT mock>=2.0 # BSD funcsigs>=0.4;python_version=='2.7' or python_version=='2.6' # Apache-2.0 mox>=0.5.3 # Apache-2.0 diff --git a/tox.ini b/tox.ini index ab44927c4..5a25fa83b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,pep8 +envlist = py27,pep8,cover minversion = 2.1 skipsdist = True @@ -27,21 +27,24 @@ commands = [testenv:py27] basepython = python2.7 -deps = {[testenv:unit_deps]deps} +deps = + {[testenv]deps} commands = {[testenv]commands} ostestr {posargs} [testenv:py35] basepython = python3.5 -deps = {[testenv:unit_deps]deps} +deps = + {[testenv]deps} commands = {[testenv]commands} ostestr {posargs} [testenv:cover] basepython = python2.7 -deps = {[testenv:unit_deps]deps} +deps = + {[testenv]deps} commands = {[testenv]commands} coverage erase @@ -49,7 +52,8 @@ commands = coverage report [testenv:debug] -deps = {[testenv:unit_deps]deps} +deps = + {[testenv]deps} commands = {[testenv]commands} oslo_debug_helper -t ./monasca_api/tests {posargs} @@ -76,15 +80,6 @@ commands = [testenv:venv] commands = {posargs} -# note(trebskit): this is just placeholder to wrap all common dependencies -# needed to run tests, those dependencies won't likely -# be needed for every possible -e here, so extracted them here -[testenv:unit_deps] -deps = - {[testenv]deps} - influxdb==2.8.0 - cassandra-driver>=2.1.4,!=3.6.0 - [flake8] # TODO: ignored checks should be enabled in the future # H201 no 'except:' at least use 'except Exception:'