Skip to content

Commit f4f6ebc

Browse files
authored
Merge branch 'main' into fix-make-test-target
2 parents 0298fb5 + 4032529 commit f4f6ebc

6 files changed

Lines changed: 22 additions & 7 deletions

File tree

juju/constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"zones",
5555
"allocate_public_ip"]
5656

57-
LIST_KEYS = {'tags', 'spaces'}
57+
LIST_KEYS = {'tags', 'spaces', 'zones'}
5858

5959
SNAKE1 = re.compile(r'(.)([A-Z][a-z]+)')
6060
SNAKE2 = re.compile('([a-z0-9])([A-Z])')

juju/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2704,15 +2704,15 @@ async def update_secret(self, name, data_args=[], new_name="", file="", info="")
27042704
if result_error.error is not None:
27052705
raise JujuAPIError(result_error.error)
27062706

2707-
async def list_secrets(self, filter="", show_secrets=False):
2707+
async def list_secrets(self, filter=None, show_secrets=False):
27082708
"""
27092709
Returns the list of available secrets.
27102710
"""
27112711
facade = client.SecretsFacade.from_connection(self.connection())
2712-
results = await facade.ListSecrets({
2713-
'filter': filter,
2714-
'show-secrets': show_secrets,
2715-
})
2712+
results = await facade.ListSecrets(
2713+
filter_=filter,
2714+
show_secrets=show_secrets,
2715+
)
27162716
return results.results
27172717

27182718
async def remove_secret(self, secret_name, revision=-1):

juju/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def get_local_charm_charmcraft_yaml(path):
301301
KINETIC = "kinetic"
302302
LUNAR = "lunar"
303303
MANTIC = "mantic"
304+
NOBLE = "noble"
304305

305306
UBUNTU_SERIES = {
306307
PRECISE: "12.04",
@@ -327,6 +328,7 @@ def get_local_charm_charmcraft_yaml(path):
327328
KINETIC: "22.10",
328329
LUNAR: "23.04",
329330
MANTIC: "23.10",
331+
NOBLE: "24.04",
330332
}
331333

332334
KUBERNETES = "kubernetes"

tests/integration/charm-manifest/manifest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ bases:
99
- amd64
1010
channel: '20.04'
1111
name: ubuntu
12+
- architectures:
13+
- amd64
14+
channel: '24.04'
15+
name: ubuntu
1216
charmcraft-started-at: '2021-08-20T08:09:00.639806Z'
1317
charmcraft-version: 1.2.1

tests/integration/test_model.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,15 @@ async def test_deploy_with_base():
437437
await model.wait_for_idle(status='active')
438438

439439

440+
@base.bootstrapped
441+
async def test_deploy_noble():
442+
charm_path = INTEGRATION_TEST_DIR / 'charm-manifest'
443+
444+
async with base.CleanModel() as model:
445+
await model.deploy(str(charm_path), base="ubuntu@24.04")
446+
await model.wait_for_idle(status='active')
447+
448+
440449
@base.bootstrapped
441450
async def test_add_machine():
442451
from juju.machine import Machine

tests/unit/test_constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_parse_constraints(self):
6060
self.assertEqual(
6161
_("mem=10G zones=bar,baz tags=tag1 spaces=space1,space2"),
6262
{"mem": 10 * 1024,
63-
"zones": "bar,baz",
63+
"zones": ["bar", "baz"],
6464
"tags": ["tag1"],
6565
"spaces": ["space1", "space2"]}
6666
)

0 commit comments

Comments
 (0)