Skip to content

Commit 64c7d80

Browse files
committed
Add another charm into the upgrade_charm test to solidify
1 parent 2868736 commit 64c7d80

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

tests/integration/test_application.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ async def test_upgrade_charm_switch_channel(event_loop):
191191
still76 = True
192192
except AssertionError:
193193
logger.warning("Charm used in test_upgrade_charm_switch_channel "
194-
"seems to have been updated, revise the test")
194+
"seems to have been updated, the test needs to be revised")
195195

196196
await app.upgrade_charm(channel='candidate')
197197
await model.wait_for_idle(status='active')
@@ -200,8 +200,15 @@ async def test_upgrade_charm_switch_channel(event_loop):
200200
try:
201201
assert charm_url.revision == 75
202202
except AssertionError:
203-
raise errors.JujuError("Either the upgrade has failed, or the charm used moved "
204-
"the candidate channel to stable, so no upgrade took place")
203+
raise errors.JujuError("Either the upgrade has failed, or the used charm moved "
204+
"the candidate channel to stable, so no upgrade took place, "
205+
"the test needs to be revised.")
206+
207+
# Try with another charm too, just in case, no need to check revisions etc
208+
app = await model.deploy('ubuntu', channel='stable')
209+
await model.wait_for_idle(status='active')
210+
await app.upgrade_charm(channel='candidate')
211+
await model.wait_for_idle(status='active')
205212

206213

207214
@base.bootstrapped

0 commit comments

Comments
 (0)