From 131a127d9395afbf023c69531be0d9f2f48f408a Mon Sep 17 00:00:00 2001 From: James Page Date: Thu, 16 Apr 2020 16:55:34 +0100 Subject: [PATCH] misc: setup gerrit integrations Add zuul configuration. Add gitreview configuration. Normalise tox and requirements file definitions. Change-Id: Icf657d939b9679b214c69a93f26611efeb6caf6d --- .gitignore | 2 ++ .gitreview | 4 +++ .zuul.yaml | 5 ++++ requirements.txt | 1 - src/test-requirements.txt | 28 ++++++-------------- src/tox.ini | 55 ++++++++++++++++++--------------------- test-requirements.txt | 2 +- 7 files changed, 46 insertions(+), 51 deletions(-) create mode 100644 .gitreview create mode 100644 .zuul.yaml diff --git a/.gitignore b/.gitignore index 1e1d2dc..b883642 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ func-results.json test-charm/ **/__pycache__ .stestr +.coverage +cover diff --git a/.gitreview b/.gitreview new file mode 100644 index 0000000..2ae209f --- /dev/null +++ b/.gitreview @@ -0,0 +1,4 @@ +[gerrit] +host=review.opendev.org +port=29418 +project=openstack/charm-trilio-wlm.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 7d907c4..b4edb8f 100644 --- a/src/test-requirements.txt +++ b/src/test-requirements.txt @@ -1,20 +1,8 @@ -# charm-proof -charm-tools>=2.0.0 -# amulet deployment helpers -bzr+lp:charm-helpers#egg=charmhelpers -# BEGIN: Amulet OpenStack Charm Helper Requirements -# Liberty client lower constraints -amulet>=1.14.3,<2.0 -bundletester>=0.6.1,<1.0 -python-keystoneclient>=1.7.1,<2.0 -python-designateclient>=1.5,<2.0 -python-cinderclient>=1.4.0,<2.0 -python-glanceclient>=1.1.0,<2.0 -python-heatclient>=0.8.0,<1.0 -python-neutronclient>=3.1.0,<4.0 -python-novaclient>=2.30.1,<3.0 -python-openstackclient>=1.7.0,<2.0 -python-swiftclient>=2.6.0,<3.0 -pika>=0.10.0,<1.0 -distro-info -# END: Amulet OpenStack Charm Helper Requirements \ No newline at end of file +# 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 879671c..07a7adc 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -1,53 +1,50 @@ -# Source charm: ./src/tox.ini +# Source charm (with zaza): ./src/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] 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 - AMULET_SETUP_TIMEOUT=2700 whitelist_externals = juju -passenv = HOME TERM AMULET_* +passenv = HOME TERM CS_* OS_* TEST_* deps = -r{toxinidir}/test-requirements.txt install_command = - pip install --allow-unverified python-apt {opts} {packages} + pip install {opts} {packages} [testenv:pep8] -basepython = python2.7 +basepython = python3 +deps=charm-tools commands = charm-proof -[testenv:func27-noop] -# DRY RUN - For Debug -basepython = python2.7 +[testenv:func-noop] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy + functest-run-suite --help -[testenv:func27] -# Run all gate tests which are +x (expected to always pass) -basepython = python2.7 +[testenv:func] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy + functest-run-suite --keep-model -[testenv:func27-smoke] -# Run a specific test as an Amulet smoke test (expected to always pass) -basepython = python2.7 +[testenv:func-smoke] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy + functest-run-suite --keep-model --smoke -[testenv:func27-dfs] -# Run all deploy-from-source tests which are +x (may not always pass!) -basepython = python2.7 +[testenv:func-target] +basepython = python3 commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy - -[testenv:func27-dev] -# Run all development test targets which are +x (may not always pass!) -basepython = python2.7 -commands = - bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dev-*" --no-destroy + functest-run-suite --keep-model --bundle {posargs} [testenv:venv] -commands = {posargs} \ No newline at end of file +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