Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: bump series and pin revision for local charm refresh tests #1158

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/integration/charm/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: charm
series: ["focal"]
series: ["jammy"]
summary: "test"
description: "test"
maintainers: ["test"]
20 changes: 17 additions & 3 deletions tests/integration/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,21 @@ async def test_upgrade_charm_resource_same_rev_no_update():
async def test_refresh_charmhub_to_local():
charm_path = INTEGRATION_TEST_DIR / 'charm'
async with base.CleanModel() as model:
app = await model.deploy('ubuntu', application_name='ubu-path')
app = await model.deploy(
'ubuntu',
application_name='ubu-path',
channel='stable',
revision=24, # revision 25 requires v2 format for local charm
)
await app.refresh(path=str(charm_path))
assert app.data['charm-url'].startswith('local:')

app = await model.deploy('ubuntu', application_name='ubu-switch')
app = await model.deploy(
'ubuntu',
application_name='ubu-switch',
channel='stable',
revision=24, # revision 25 requires v2 format for local charm
)
await app.refresh(switch=str(charm_path))
assert app.data['charm-url'].startswith('local:')

Expand All @@ -275,7 +285,11 @@ async def test_refresh_charmhub_to_local():
async def test_local_refresh():
charm_path = INTEGRATION_TEST_DIR / 'charm'
async with base.CleanModel() as model:
app = await model.deploy('ubuntu')
app = await model.deploy(
'ubuntu',
channel='stable',
revision=24, # revision 25 requires v2 format for local charm
)
origin = client.CharmOrigin(source="charm-hub", track="20.04", risk="stable",
branch="deadbeef", hash_="hash", id_="id", revision=12,
base=client.Base("20.04", "ubuntu"))
Expand Down
Loading