diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -26,6 +26,7 @@ deps = pylint==2.6.0 # test-requirements because unit tests are now present in cloudinit tree -r{toxinidir}/test-requirements.txt + -r{toxinidir}/cloud-tests-requirements.txt -r{toxinidir}/integration-requirements.txt commands = {envpython} -m pylint {posargs:cloudinit tests tools} @@ -128,6 +129,7 @@ deps = pylint # test-requirements -r{toxinidir}/test-requirements.txt + -r{toxinidir}/cloud-tests-requirements.txt -r{toxinidir}/integration-requirements.txt [testenv:citest] @@ -135,12 +137,45 @@ basepython = python3 commands = {envpython} -m tests.cloud_tests {posargs} passenv = HOME TRAVIS deps = + -r{toxinidir}/cloud-tests-requirements.txt + +# Until Xenial tox support is dropped or bumps to tox:2.3.2, reflect changes to +# deps into testenv:integration-tests-ci: commands, passenv and deps. +# This is due to (https://github.com/tox-dev/tox/issues/208) which means that +# the {posargs} handling and substitutions won't do what we want until tox 2.3.2 +# Once Xenial is dropped, integration-tests-ci can use proper substitution +# commands = {[testenv:integration-tests]commands} +[testenv:integration-tests] +basepython = python3 +commands = {envpython} -m pytest --log-cli-level=INFO {posargs:tests/integration_tests} +passenv = CLOUD_INIT_* +deps = -r{toxinidir}/integration-requirements.txt +[testenv:integration-tests-ci] +commands = {envpython} -m pytest --log-cli-level=INFO {posargs:tests/integration_tests} +passenv = CLOUD_INIT_* +deps = + -r{toxinidir}/integration-requirements.txt +setenv = + PYTEST_ADDOPTS="-m ci" + [pytest] # TODO: s/--strict/--strict-markers/ once xenial support is dropped +testpaths = cloudinit tests/unittests addopts = --strict markers = allow_subp_for: allow subp usage for the given commands (disable_subp_usage) allow_all_subp: allow all subp usage (disable_subp_usage) + ci: run this integration test as part of CI test runs ds_sys_cfg: a sys_cfg dict to be used by datasource fixtures + ec2: test will only run on EC2 platform + gce: test will only run on GCE platform + azure: test will only run on Azure platform + oci: test will only run on OCI platform + lxd_container: test will only run in LXD container + lxd_vm: test will only run in LXD VM + no_container: test cannot run in a container + user_data: the user data to be passed to the test instance + instance_name: the name to be used for the test instance + sru_2020_11: test is part of the 2020/11 SRU verification |