-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add juju3 support for func tests. Add make target, tox environment to support juju3 along with juju2. Some changes were done to run the same set of func tests for both libjuju versions without having to check which version we're on: * Replace `run_wait()` method with `run_command_on_unit()` in conftest.py's `SyncHelper` class. This changes the functionality from running a command on a unit with libjuju's `unit.run` (which could potentially return different dictionaries for juju2 and juju3), to a similar `juju exec --unit` command run using ops_test.juju. * `juju exec` return code is different for failure between juju2 and juju3. So the assert check for failure is changed to "> 0" instead of checking strict equality with a non-zero integer. * Update GitHub workflow files. * Update GH workflow lxd nested containers to false * Restructure requirements in tox file
- Loading branch information
Showing
8 changed files
with
89 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Check workflow running linter, unit and functional tests | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: [master, main] | ||
paths-ignore: | ||
- "**.md" | ||
- "**.rst" | ||
|
||
jobs: | ||
lint-unit: | ||
uses: canonical/bootstack-actions/.github/workflows/lint-unit.yaml@v2 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.10"] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
tox-version: "<4" | ||
|
||
func: | ||
uses: canonical/bootstack-actions/.github/workflows/func.yaml@v2 | ||
needs: lint-unit | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- juju-channel: "2.9/stable" | ||
command: "make functional" | ||
- juju-channel: "3.1/stable" | ||
command: "make functional31" | ||
with: | ||
command: ${{ matrix.command }} | ||
juju-channel: ${{ matrix.juju-channel }} | ||
nested-containers: false | ||
provider: "lxd" | ||
python-version: "3.10" | ||
timeout-minutes: 120 | ||
tox-version: "<4" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Make OpsTest works with controller version < 3 | ||
juju < 3 | ||
pytest | ||
pytest-operator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters