sunbeam-charms/tox.ini
Hemanth Nakkina 57070337b4
Bump juju channel to 3.4
Move testing to juju 3.4

Set base to ubuntu@22.04 in all test bundles with traefik
charm to ubuntu@20.04. tox can be modified to include
default-series=;default-base=ubuntu@22.04 in TEST_MODEL_SETTINGS
but that is not working for lxd based cloud.

Update tox to use zaza from main instead of libjuju-3.1
for func tests.

Func-tests for core are failing due to heavy load. Moved horizon
to tests/misc

Change-Id: I6c025e1350aad7ead922cf5feef19c67c308dbbd
2024-02-22 15:58:06 +05:30

106 lines
2.1 KiB
INI

# Global tox file
# This file is used to invoke tox in individual charms
[tox]
skipsdist = True
envlist = pep8,py3
sitepackages = False
skip_missing_interpreters = False
minversion = 3.18.0
[testenv]
passenv =
HOME
allowlist_externals =
{toxinidir}/run_tox.sh
{toxinidir}/fetch_libs.sh
{toxinidir}/generate_token.sh
[testenv:fetch]
basepython = python3
deps =
commands =
{toxinidir}/fetch_libs.sh
[testenv:fmt]
description = Apply coding style standards to code
deps =
black
isort
commands =
{toxinidir}/run_tox.sh fmt
[testenv:pep8]
description = Alias for lint
deps =
black
flake8<6
flake8-docstrings
flake8-copyright
flake8-builtins
pyproject-flake8
pep8-naming
isort
codespell
commands =
{toxinidir}/run_tox.sh pep8
[testenv:py3]
deps =
-r{toxinidir}/test-requirements.txt
commands =
{toxinidir}/run_tox.sh py3 {posargs}
[testenv:py310]
deps = {[testenv:py3]deps}
commands =
{toxinidir}/run_tox.sh py310 {posargs}
[testenv:py311]
deps = {[testenv:py3]deps}
commands =
{toxinidir}/run_tox.sh py311 {posargs}
[testenv:cover]
deps = {[testenv:py3]deps}
commands =
{toxinidir}/run_tox.sh cover {posargs}
[testenv:build]
basepython = python3
deps =
commands =
{toxinidir}/run_tox.sh build {posargs}
[testenv:func-noop]
basepython = python3
deps =
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack
git+https://opendev.org/openstack/tempest.git#egg=tempest
commands =
functest-run-suite --help
[testenv:func]
basepython = python3
deps = {[testenv:func-noop]deps}
passenv =
HOME
PYTHONPATH
setenv =
TEST_MODEL_SETTINGS = automatically-retry-hooks=true
TEST_MAX_RESOLVE_COUNT = 5
PYTHONPATH = {toxinidir}/tests/local:{env:PYTHONPATH}
commands =
python3 render_bundles.py
# Example: functest-run-suite --keep-model --smoke --test-directory=tests/set1
functest-run-suite --keep-model {posargs}
[testenv:generate-token]
basepython = python3
deps =
zuul-client
commands =
{toxinidir}/generate_token.sh