Skip to content

Commit

Permalink
fix(series): add noble support
Browse files Browse the repository at this point in the history
The pylibjuju client hardcodes a mapping between series codename
and the base channel.

Noble was absent from this mapping, meaning pylibjuju doesn't know
know to deploy to noble.

Add noble to this mapping.

After noble, we will only support deploying by base. Noble will be the
last series added to this map

Add an integration test which deploys a charm to noble
  • Loading branch information
jack-w-shaw committed Jul 11, 2024
1 parent 4737dc8 commit 6bfbe24
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions juju/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ def get_local_charm_charmcraft_yaml(path):
KINETIC = "kinetic"
LUNAR = "lunar"
MANTIC = "mantic"
NOBLE = "noble"

UBUNTU_SERIES = {
PRECISE: "12.04",
Expand All @@ -327,6 +328,7 @@ def get_local_charm_charmcraft_yaml(path):
KINETIC: "22.10",
LUNAR: "23.04",
MANTIC: "23.10",
NOBLE: "24.04",
}

KUBERNETES = "kubernetes"
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/charm-manifest/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@ bases:
- amd64
channel: '20.04'
name: ubuntu
- architectures:
- amd64
channel: '24.04'
name: ubuntu
charmcraft-started-at: '2021-08-20T08:09:00.639806Z'
charmcraft-version: 1.2.1
9 changes: 9 additions & 0 deletions tests/integration/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,15 @@ async def test_deploy_with_base():
await model.wait_for_idle(status='active')


@base.bootstrapped
async def test_deploy_noble():
charm_path = INTEGRATION_TEST_DIR / 'charm-manifest'

async with base.CleanModel() as model:
await model.deploy(str(charm_path), base="[email protected]")
await model.wait_for_idle(status='active')


@base.bootstrapped
async def test_add_machine():
from juju.machine import Machine
Expand Down

0 comments on commit 6bfbe24

Please sign in to comment.