Skip to content

Commit b3aa395

Browse files
committed
Add another charm into the upgrade_charm test to solidify
1 parent 08a7de1 commit b3aa395

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
@@ -193,7 +193,7 @@ async def test_upgrade_charm_switch_channel(event_loop):
193193
still76 = True
194194
except AssertionError:
195195
logger.warning("Charm used in test_upgrade_charm_switch_channel "
196-
"seems to have been updated, revise the test")
196+
"seems to have been updated, the test needs to be revised")
197197

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

208215

209216
@base.bootstrapped

0 commit comments

Comments
 (0)