Skip to content

Commit

Permalink
Merge pull request #9 from canonical/feature/split_bases
Browse files Browse the repository at this point in the history
Split bases
  • Loading branch information
PietroPasotti authored Oct 9, 2023
2 parents b36d5c7 + fe9549b commit 49abf15
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 5 additions & 0 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ bases:
- name: "ubuntu"
channel: "22.04"
architectures: ["amd64"]
- build-on:
- name: "ubuntu"
channel: "20.04"
architectures: ["amd64"]
run-on:
- name: "ubuntu"
channel: "20.04"
architectures: ["amd64"]
Expand Down
9 changes: 8 additions & 1 deletion tests/integration/test_juju_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@ async def test_build_and_deploy(ops_test: OpsTest, grafana_agent_charm):
await ops_test.model.deploy(
principal.charm, application_name=principal.name, num_units=2, series="jammy"
)

# Workaround: `charmcraft pack` produces two files, but `ops_test.build_charm` returns the
# first one. Since primary is jammy, we know we need to deploy the jammy grafana agent charm,
# otherwise we'd get an error such as:
# ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory
jammy_charm_path = grafana_agent_charm.parent / "grafana-agent_ubuntu-22.04-amd64.charm"

# Subordinate
await ops_test.model.deploy(
grafana_agent_charm, application_name=agent.name, num_units=0, series="jammy"
jammy_charm_path, application_name=agent.name, num_units=0, series="jammy"
)

# Placeholder for o11y relations (otherwise grafana agent charm is in blocked status)
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ deps =
juju ~= 3.1.0
pytest
prometheus-api-client
pytest-operator
#pytest-operator
# https://github.com/charmed-kubernetes/pytest-operator/pull/115
pytest-operator @ git+https://github.com/sed-i/pytest-operator@patch-1
commands =
pytest -v --tb native --log-cli-level=INFO -s {posargs} {[vars]tst_path}/integration

Expand Down

0 comments on commit 49abf15

Please sign in to comment.