diff --git a/src/lib/charm/openstack/designate.py b/src/lib/charm/openstack/designate.py index a8be2b8..a6127a5 100644 --- a/src/lib/charm/openstack/designate.py +++ b/src/lib/charm/openstack/designate.py @@ -270,7 +270,7 @@ class BindRNDCRelationAdapter(openstack_adapters.OpenStackRelationAdapter): class DesignateConfigurationAdapter( - openstack_adapters.APIConfigurationAdapter): + openstack_adapters.APIConfigurationAdapter): def __init__(self, port_map=None): super(DesignateConfigurationAdapter, self).__init__( diff --git a/src/tox.ini b/src/tox.ini index 4a6291e..479d7bb 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -1,13 +1,16 @@ +# Source charm: ./src/tox.ini +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. [tox] envlist = pep8 skipsdist = True [testenv] -envdir = .tox/py27 setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 AMULET_SETUP_TIMEOUT=2700 -passenv = HOME TERM AMULET_HTTP_PROXY AMULET_OS_VIP +whitelist_externals = juju +passenv = HOME TERM AMULET_* deps = -r{toxinidir}/test-requirements.txt install_command = pip install --allow-unverified python-apt {opts} {packages} @@ -23,28 +26,24 @@ commands = bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" -n --no-destroy [testenv:func27] -# Charm Functional Test # Run all gate tests which are +x (expected to always pass) basepython = python2.7 commands = bundletester -vl DEBUG -r json -o func-results.json --test-pattern "gate-*" --no-destroy [testenv:func27-smoke] -# Charm Functional Test # Run a specific test as an Amulet smoke test (expected to always pass) basepython = python2.7 commands = bundletester -vl DEBUG -r json -o func-results.json gate-basic-xenial-mitaka --no-destroy [testenv:func27-dfs] -# Charm Functional Test # Run all deploy-from-source tests which are +x (may not always pass!) basepython = python2.7 commands = bundletester -vl DEBUG -r json -o func-results.json --test-pattern "dfs-*" --no-destroy [testenv:func27-dev] -# Charm Functional Test # Run all development test targets which are +x (may not always pass!) basepython = python2.7 commands = diff --git a/tox.ini b/tox.ini index 26da278..893f30f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,36 +1,28 @@ +# Source charm: ./tox.ini +# This file is managed centrally by release-tools and should not be modified +# within individual charm repos. [tox] skipsdist = True envlist = pep8,py34,py35 skip_missing_interpreters = True [testenv] -basepython = python2.7 setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 TERM=linux - INTERFACE_PATH={toxinidir}/interfaces LAYER_PATH={toxinidir}/layers + INTERFACE_PATH={toxinidir}/interfaces JUJU_REPOSITORY={toxinidir}/build passenv = http_proxy https_proxy install_command = pip install {opts} {packages} deps = - -r{toxinidir}/requirements.txt + -r{toxinidir}/requirements.txt [testenv:build] +basepython = python2.7 commands = - charm-build --log-level DEBUG -o {toxinidir}/build src - -[testenv:venv] -commands = {posargs} - -[testenv:pep8] -commands = flake8 {posargs} src/reactive src/lib unit_tests - -# Disable py27 tests as this is a reactive python 3 charm. Once project -# config has been updated this tox target can be removed -[testenv:py27] -commands = /bin/true + charm-build --log-level DEBUG -o {toxinidir}/build src {posargs} [testenv:py34] basepython = python3.4 @@ -41,3 +33,15 @@ commands = ostestr {posargs} basepython = python3.5 deps = -r{toxinidir}/test-requirements.txt commands = ostestr {posargs} + +[testenv:pep8] +basepython = python2.7 +deps = -r{toxinidir}/test-requirements.txt +commands = flake8 {posargs} src unit_tests + +[testenv:venv] +commands = {posargs} + +[flake8] +# E402 ignore necessary for path append before sys module import in actions +ignore = E402