Skip to content

Commit

Permalink
test: Use TEST_JUJU_CHANNEL pass from Makefile to control juju version
Browse files Browse the repository at this point in the history
  • Loading branch information
jneo8 committed Apr 10, 2024
1 parent a6e7ffa commit 576e468
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 31 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,19 @@ unittests:

functional: build
@echo "Executing functional tests using built charm at ${PROJECTPATH}"
@CHARM_LOCATION=${PROJECTPATH} tox -e func -- ${FUNC_ARGS}
@TEST_JUJU_CHANNEL=2.9/stable CHARM_LOCATION=${PROJECTPATH} tox -e func -- ${FUNC_ARGS}

functional31: build
@echo "Executing functional tests using built charm at ${PROJECTPATH} with juju 3.1 requirements"
@CHARM_LOCATION=${PROJECTPATH} tox -e func31 -- ${FUNC_ARGS}
@TEST_JUJU_CHANNEL=3.1/stable CHARM_LOCATION=${PROJECTPATH} tox -e func -- ${FUNC_ARGS}

functional32: build
@echo "Executing functional tests using built charm at ${PROJECTPATH} with juju 3.2 requirements"
@CHARM_LOCATION=${PROJECTPATH} tox -e func32 -- ${FUNC_ARGS}
@TEST_JUJU_CHANNEL=3.2/stable CHARM_LOCATION=${PROJECTPATH} tox -e func -- ${FUNC_ARGS}

functional33: build
@echo "Executing functional tests using built charm at ${PROJECTPATH} with juju 3.3 requirements"
@CHARM_LOCATION=${PROJECTPATH} tox -e func33 -- ${FUNC_ARGS}
@TEST_JUJU_CHANNEL=3.3/stable CHARM_LOCATION=${PROJECTPATH} tox -e func -- ${FUNC_ARGS}

test: lint unittests functional
@echo "Tests completed for charm ${CHARM_NAME}."
Expand Down
30 changes: 3 additions & 27 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ passenv =
SNAP_HTTP_PROXY
SNAP_HTTPS_PROXY
OS_*
TEST_*

[testenv:dev-environment]
envdir = {toxinidir}/.venv
Expand Down Expand Up @@ -77,40 +78,15 @@ deps =
pytest-cov

[testenv:func]
setenv =
TEST_JUJU_CHANNEL = 2.9/stable
changedir = {toxinidir}/tests/functional
commands = functest-run-suite {posargs:--keep-faulty-model}
deps =
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
-r {toxinidir}/tests/functional/requirements.txt

[testenv:func31]
setenv =
TEST_JUJU_CHANNEL = 3.1/stable
changedir = {toxinidir}/tests/functional
commands =
functest-run-suite {posargs:--keep-faulty-model}
deps =
git+https://github.com/openstack-charmers/[email protected]#egg=zaza
-r {toxinidir}/tests/functional/requirements.txt

[testenv:func32]
setenv =
TEST_JUJU_CHANNEL = 3.2/stable
changedir = {toxinidir}/tests/functional
commands =
functest-run-suite {posargs:--keep-faulty-model}
deps =
git+https://github.com/openstack-charmers/[email protected]#egg=zaza
-r {toxinidir}/tests/functional/requirements.txt

[testenv:func33]
setenv =
TEST_JUJU_CHANNEL = 3.3/stable
[testenv:func3]
changedir = {toxinidir}/tests/functional
commands =
functest-run-suite {posargs:--keep-faulty-model}
commands = functest-run-suite {posargs:--keep-faulty-model}
deps =
git+https://github.com/openstack-charmers/[email protected]#egg=zaza
-r {toxinidir}/tests/functional/requirements.txt

0 comments on commit 576e468

Please sign in to comment.