File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,12 +150,12 @@ async def test_upgrade_local_charm(event_loop):
150150 async with base .CleanModel () as model :
151151 tests_dir = Path (__file__ ).absolute ().parent
152152 charm_path = tests_dir / 'upgrade-charm'
153- app = await model .deploy ('ubuntu-0' )
154- await model .block_until (lambda : (len (app .units ) > 0 and
155- app .units [0 ].machine ))
156- assert app .data ['charm-url' ] == 'cs:ubuntu-0'
153+ app = await model .deploy ('ubuntu' , series = 'focal' )
154+ await model .wait_for_idle (wait_for_active = True )
155+ assert app .data ['charm-url' ].startswith ('cs:ubuntu' )
157156 await app .upgrade_charm (path = charm_path )
158- assert app .data ['charm-url' ] == 'local:ubuntu'
157+ await model .wait_for_idle () # nb: can't use wait_for_active because test charm goes to "waiting"
158+ assert app .data ['charm-url' ] == 'local:focal/ubuntu-0'
159159
160160
161161@base .bootstrapped
You can’t perform that action at this time.
0 commit comments