Skip to content

Commit

Permalink
Merge pull request #655 from rgildein/chore/no-ref/fix-action-object
Browse files Browse the repository at this point in the history
Fix `unit.run` to support Juju 2.9 and 3.x
  • Loading branch information
freyes authored Apr 18, 2024
2 parents 8ff3f48 + 14bab3a commit 6787575
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 85 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/tox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
# - 3.1/stable
# - 3.2/stable
# - 3.3/stable
- 3.4/stable
bundle:
- first
- second
Expand All @@ -59,6 +60,10 @@ jobs:
# - juju_channel: 3.3/stable
# snap_install_flags: ""
# pip_constraints: constraints-juju33.txt
- juju_channel: 3.4/stable
snap_install_flags: ""
pip_constraints: constraints-juju34.txt
juju3: 1
env:
TEST_ZAZA_BUG_LP1987332: "on" # http://pad.lv/1987332
needs: build
Expand Down Expand Up @@ -93,6 +98,7 @@ jobs:
set -euxo pipefail
mkdir logs
export PIP_CONSTRAINTS=$(pwd)/${{ matrix.pip_constraints }}
export TEST_JUJU3=${{ matrix.juju3 }}
tox -e func-target -- ${{ matrix.bundle }} | tee logs/tox-output.txt
- name: crashdump on failure
if: failure()
Expand Down
9 changes: 9 additions & 0 deletions constraints-juju34.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# NOTE: this constraints file can be (and will be) consumed by downstream users.
#
# Known consumers:
# * zosci-config: job definitions that declare what juju version (snap channel)
# is used in tandem with this constraints file to lockdown python-libjuju
# version.
# * zaza-openstack-tests
#
juju>=3.4.0,<3.5.0
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ deps =
-r{toxinidir}/test-requirements.txt
commands = pytest --cov=./zaza/ {posargs} {toxinidir}/unit_tests

[testenv:.pkg]
pass_env =
# NOTE: This is required because tox>=4 will not pass env. See https://github.com/tox-dev/tox/issues/2543.
TEST_JUJU3

[testenv:py3]
basepython = python3

Expand Down
Loading

0 comments on commit 6787575

Please sign in to comment.