Skip to content

Commit d2685f6

Browse files
DomFleischmannjohnsca
andauthored
Update tests/integration/test_application.py
Co-authored-by: Cory Johns <johnsca@gmail.com>
1 parent 6393d6a commit d2685f6

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/integration/test_application.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)