File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,6 +264,26 @@ async def test_upgrade_local_charm(event_loop):
264264 assert app .data ['charm-url' ] == 'local:focal/ubuntu-0'
265265
266266
267+ @base .bootstrapped
268+ @pytest .mark .asyncio
269+ async def test_upgrade_local_charm_resource (event_loop ):
270+ async with base .CleanModel () as model :
271+ tests_dir = Path (__file__ ).absolute ().parent
272+ charm_path = tests_dir / 'file-resource-charm'
273+ resources = {"file-res" : "test.file" }
274+
275+ app = await model .deploy (str (charm_path ), resources = resources )
276+ assert 'file-resource-charm' in model .applications
277+ await model .wait_for_idle ()
278+ assert app .units [0 ].agent_status == 'idle'
279+
280+ await app .upgrade_charm (path = charm_path , resources = resources )
281+ await model .wait_for_idle ()
282+ ress = await app .get_resources ()
283+ assert 'file-res' in ress
284+ assert ress ['file-res' ]
285+
286+
267287@base .bootstrapped
268288@pytest .mark .asyncio
269289@pytest .mark .skip ('Update charm' )
You can’t perform that action at this time.
0 commit comments