Skip to content

Commit

Permalink
chore: add juju 3.1 support for functests
Browse files Browse the repository at this point in the history
Reviewed-on: https://code.launchpad.net/~mertkirpici/charm-juju-local/+git/charm-juju-local/+merge/450788
Reviewed-by: Erhan Sunar <[email protected]>
Reviewed-by: 🤖 prod-jenkaas-bootstack <[email protected]>
Reviewed-by: Andrea Ieri <[email protected]>
  • Loading branch information
Mert Kirpici authored and Canonical IS Mergebot committed Sep 8, 2023
2 parents d8bf76a + 438a947 commit 3d15251
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 13 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ unittests:
test: lint functional

functional: build
@JUJU_REPOSITORY=$(JUJU_REPOSITORY) tox -e functional
@JUJU_REPOSITORY=$(JUJU_REPOSITORY) tox -e func

functional31: build
@JUJU_REPOSITORY=$(JUJU_REPOSITORY) tox -e func31

build:
@echo "Building charm to base directory $(JUJU_REPOSITORY)"
Expand All @@ -40,5 +43,5 @@ clean:
@$(RM) $(JUJU_REPOSITORY)/$(CHARM_NAME).charm

# The targets below don't depend on a file
.PHONY: lint test functional build release clean help
.PHONY: lint test functional functional31 build release clean help

3 changes: 0 additions & 3 deletions test-requirements.txt → tests/functional/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# zaza
git+https://github.com/openstack-charmers/zaza.git#egg=zaza
git+https://github.com/openstack-charmers/zaza-openstack-tests.git#egg=zaza.openstack

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
26 changes: 18 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,27 @@ skip_missing_interpreters = True

[testenv]
basepython = python3
setenv =
PYTHONPATH = .

[testenv:functional]
commands =
functest-run-suite --keep-faulty-model
deps = -r{toxinidir}/test-requirements.txt
passenv =
HOME
JUJU_REPOSITORY
OS_*
JUJU_REPOSITORY

setenv =
PYTHONPATH = .

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

[testenv:func31]
changedir = {toxinidir}/tests/functional
deps =
-r {toxinidir}/tests/functional/requirements.txt
git+https://github.com/esunar/zaza.git@fix-normalise_action_results#egg=zaza[juju-31]
commands = functest-run-suite --keep-faulty-model {posargs}

[testenv:func-smoke]
commands =
Expand Down

0 comments on commit 3d15251

Please sign in to comment.