Skip to content

Commit 6787575

Browse files
authored
Merge pull request #655 from rgildein/chore/no-ref/fix-action-object
Fix `unit.run` to support Juju 2.9 and 3.x
2 parents 8ff3f48 + 14bab3a commit 6787575

File tree

6 files changed

+143
-85
lines changed

6 files changed

+143
-85
lines changed

.github/workflows/tox.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
# - 3.1/stable
3939
# - 3.2/stable
4040
# - 3.3/stable
41+
- 3.4/stable
4142
bundle:
4243
- first
4344
- second
@@ -59,6 +60,10 @@ jobs:
5960
# - juju_channel: 3.3/stable
6061
# snap_install_flags: ""
6162
# pip_constraints: constraints-juju33.txt
63+
- juju_channel: 3.4/stable
64+
snap_install_flags: ""
65+
pip_constraints: constraints-juju34.txt
66+
juju3: 1
6267
env:
6368
TEST_ZAZA_BUG_LP1987332: "on" # http://pad.lv/1987332
6469
needs: build
@@ -93,6 +98,7 @@ jobs:
9398
set -euxo pipefail
9499
mkdir logs
95100
export PIP_CONSTRAINTS=$(pwd)/${{ matrix.pip_constraints }}
101+
export TEST_JUJU3=${{ matrix.juju3 }}
96102
tox -e func-target -- ${{ matrix.bundle }} | tee logs/tox-output.txt
97103
- name: crashdump on failure
98104
if: failure()

constraints-juju34.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# NOTE: this constraints file can be (and will be) consumed by downstream users.
2+
#
3+
# Known consumers:
4+
# * zosci-config: job definitions that declare what juju version (snap channel)
5+
# is used in tandem with this constraints file to lockdown python-libjuju
6+
# version.
7+
# * zaza-openstack-tests
8+
#
9+
juju>=3.4.0,<3.5.0

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ deps =
2323
-r{toxinidir}/test-requirements.txt
2424
commands = pytest --cov=./zaza/ {posargs} {toxinidir}/unit_tests
2525

26+
[testenv:.pkg]
27+
pass_env =
28+
# NOTE: This is required because tox>=4 will not pass env. See https://github.com/tox-dev/tox/issues/2543.
29+
TEST_JUJU3
30+
2631
[testenv:py3]
2732
basepython = python3
2833

0 commit comments

Comments
 (0)