diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..87f629f --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.opendev.org +port=29418 +project=openstack/charm-trilio-horizon-plugin.git diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..b3037e9 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,5 @@ +- project: + templates: + - python35-charm-jobs + - openstack-python3-ussuri-jobs + - openstack-cover-jobs diff --git a/requirements.txt b/requirements.txt index cb6c9d4..6371beb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ # Requirements to build the charm charm-tools simplejson -flake8 \ No newline at end of file diff --git a/src/test-requirements.txt b/src/test-requirements.txt index 9a0bed8..b4edb8f 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -1,7 +1,8 @@ -# Unit test requirements -flake8>=2.2.4,<=2.4.1 -os-testr>=0.4.1 -charms.reactive -mock>=1.2 -coverage>=3.6 -git+https://github.com/openstack/charms.openstack#egg=charms.openstack +# 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/javacruft/zaza-openstack-tests.git@triliovault-testing#egg=zaza.openstack diff --git a/src/tox.ini b/src/tox.ini index ef04f42..07a7adc 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -1,21 +1,50 @@ -# tox (https://tox.readthedocs.io/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. +# 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] -skipsdist = True envlist = pep8 +skipsdist = True +# NOTE: Avoid build/test env pollution by not enabling sitepackages. +sitepackages = False +# NOTE: Avoid false positives by not skipping missing interpreters. +skip_missing_interpreters = False [testenv] setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 - TERM=linux - INTERFACE_PATH={toxinidir}/interfaces - LAYER_PATH={toxinidir}/layers - JUJU_REPOSITORY={toxinidir}/build +whitelist_externals = juju +passenv = HOME TERM CS_* OS_* TEST_* +deps = -r{toxinidir}/test-requirements.txt +install_command = + pip install {opts} {packages} [testenv:pep8] basepython = python3 -deps = -r{toxinidir}/test-requirements.txt -commands = flake8 {posargs} reactive +deps=charm-tools +commands = charm-proof + +[testenv:func-noop] +basepython = python3 +commands = + functest-run-suite --help + +[testenv:func] +basepython = python3 +commands = + functest-run-suite --keep-model + +[testenv:func-smoke] +basepython = python3 +commands = + functest-run-suite --keep-model --smoke + +[testenv:func-target] +basepython = python3 +commands = + functest-run-suite --keep-model --bundle {posargs} + +[testenv:venv] +commands = {posargs} diff --git a/test-requirements.txt b/test-requirements.txt index 422d55b..4d70242 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,6 @@ # Unit test requirements flake8>=2.2.4 -os-testr>=0.4.1 +stestr>=2.2.0 charms.reactive mock>=1.2 coverage>=3.6 diff --git a/tox.ini b/tox.ini index 5b41c1d..afd48f0 100644 --- a/tox.ini +++ b/tox.ini @@ -50,6 +50,11 @@ basepython = python3.7 deps = -r{toxinidir}/test-requirements.txt commands = stestr run --slowest {posargs} +[testenv:py38] +basepython = python3.8 +deps = -r{toxinidir}/test-requirements.txt +commands = stestr run --slowest {posargs} + [testenv:pep8] basepython = python3 deps = -r{toxinidir}/test-requirements.txt