From 4b057abce7a291c02d334fc38a886fc30bd1d94a Mon Sep 17 00:00:00 2001 From: Ryan Beisner Date: Mon, 30 Sep 2019 17:09:14 -0500 Subject: [PATCH] Sync charm/ceph helpers, tox, and requirements Change-Id: I4cb71f4d4e56d3465aad294789ad213eb085fe5a --- requirements.txt | 7 ++++--- src/files/.gitkeep | 0 src/test-requirements.txt | 17 +++++++---------- src/tox.ini | 14 ++++++++++---- src/wheelhouse.txt | 2 ++ test-requirements.txt | 16 +++++++++++++--- tox.ini | 24 ++++++++++++++---------- 7 files changed, 50 insertions(+), 30 deletions(-) create mode 100644 src/files/.gitkeep diff --git a/requirements.txt b/requirements.txt index 20f335d2..b1d4872c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ -# This file is managed centrally. If you find the need to modify this as a -# one-off, please don't. Intead, consult #openstack-charms and ask about -# requirements management in charms via bot-control. Thank you. +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of *requirements.txt files for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools # # Build requirements charm-tools>=2.4.4 diff --git a/src/files/.gitkeep b/src/files/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/src/test-requirements.txt b/src/test-requirements.txt index f4a766df..d3c9be84 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -1,11 +1,8 @@ -# This file is managed centrally. If you find the need to modify this as a -# one-off, please don't. Intead, consult #openstack-charms and ask about -# requirements management in charms via bot-control. Thank you. -charm-tools>=2.4.4 -coverage>=3.6 -mock>=1.2 -flake8>=2.2.4,<=2.4.1 -stestr>=2.2.0 -requests>=2.18.4 +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of *requirements.txt files for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools +# +# Functional Test Requirements (let Zaza's dependencies solve all dependencies here!) git+https://github.com/openstack-charmers/zaza.git#egg=zaza -git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack \ No newline at end of file +git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack diff --git a/src/tox.ini b/src/tox.ini index 00c11349..07a7adcb 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -1,16 +1,22 @@ +# Source charm (with zaza): ./src/tox.ini +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of tox.ini for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools + [tox] envlist = pep8 skipsdist = True -# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages. +# NOTE: Avoid build/test env pollution by not enabling sitepackages. sitepackages = False -# NOTE(beisner): Avoid false positives by not skipping missing interpreters. +# NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 whitelist_externals = juju -passenv = HOME TERM CS_API_* OS_* +passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt install_command = pip install {opts} {packages} @@ -23,7 +29,7 @@ commands = charm-proof [testenv:func-noop] basepython = python3 commands = - true + functest-run-suite --help [testenv:func] basepython = python3 diff --git a/src/wheelhouse.txt b/src/wheelhouse.txt index 4cee7cc9..34f83c7f 100644 --- a/src/wheelhouse.txt +++ b/src/wheelhouse.txt @@ -2,5 +2,7 @@ keystoneauth1 pbr python-novaclient python-neutronclient +# tactical fix for https://github.com/celery/kombu/issues/1105 +amqp==2.5.1 neutron_lib pytest-runner diff --git a/test-requirements.txt b/test-requirements.txt index 14b380e4..0ab97f6e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,7 @@ -# This file is managed centrally. If you find the need to modify this as a -# one-off, please don't. Intead, consult #openstack-charms and ask about -# requirements management in charms via bot-control. Thank you. +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. See the 'global' dir contents for available +# choices of *requirements.txt files for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools # # Lint and unit test requirements flake8>=2.2.4,<=2.4.1 @@ -11,3 +12,12 @@ mock>=1.2 nose>=1.3.7 coverage>=3.6 git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack +# +# Revisit for removal / mock improvement: +netifaces # vault +psycopg2-binary # vault +tenacity # vault +pbr # vault +cryptography # vault, keystone-saml-mellon +lxml # keystone-saml-mellon +hvac # vault, barbican-vault diff --git a/tox.ini b/tox.ini index 2cc5a506..5b41c1dd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,15 @@ # Source charm: ./tox.ini # This file is managed centrally by release-tools and should not be modified -# within individual charm repos. +# within individual charm repos. See the 'global' dir contents for available +# choices of tox.ini for OpenStack Charms: +# https://github.com/openstack-charmers/release-tools + [tox] skipsdist = True envlist = pep8,py3 -# NOTE(beisner): Avoid build/test env pollution by not enabling sitepackages. +# NOTE: Avoid build/test env pollution by not enabling sitepackages. sitepackages = False -# NOTE(beisner): Avoid false positives by not skipping missing interpreters. +# NOTE: Avoid false positives by not skipping missing interpreters. skip_missing_interpreters = False [testenv] @@ -14,8 +17,9 @@ setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux LAYER_PATH={toxinidir}/layers + INTERFACE_PATH={toxinidir}/interfaces JUJU_REPOSITORY={toxinidir}/build -passenv = http_proxy https_proxy INTERFACE_PATH +passenv = http_proxy https_proxy INTERFACE_PATH LAYER_PATH JUJU_REPOSITORY install_command = pip install {opts} {packages} deps = @@ -29,22 +33,22 @@ commands = [testenv:py3] basepython = python3 deps = -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} +commands = stestr run --slowest {posargs} [testenv:py35] basepython = python3.5 deps = -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} +commands = stestr run --slowest {posargs} [testenv:py36] basepython = python3.6 deps = -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} +commands = stestr run --slowest {posargs} [testenv:py37] basepython = python3.7 deps = -r{toxinidir}/test-requirements.txt -commands = stestr run {posargs} +commands = stestr run --slowest {posargs} [testenv:pep8] basepython = python3 @@ -62,7 +66,7 @@ setenv = PYTHON=coverage run commands = coverage erase - stestr run {posargs} + stestr run --slowest {posargs} coverage combine coverage html -d cover coverage xml -o cover/coverage.xml @@ -85,4 +89,4 @@ commands = {posargs} [flake8] # E402 ignore necessary for path append before sys module import in actions -ignore = E402 +ignore = E402,W504