File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44import logging
55
66from .. import base
7+ from ..utils import INTEGRATION_TEST_DIR
78from juju import errors
89from juju .url import URL , Schema
910
@@ -237,6 +238,28 @@ async def test_upgrade_charm_resource_same_rev_no_update(event_loop):
237238 assert ress ['policyd-override' ].fingerprint == ress2 ['policyd-override' ].fingerprint
238239
239240
241+ @base .bootstrapped
242+ @pytest .mark .asyncio
243+ async def test_upgrade_local_charm_with_resource (event_loop ):
244+ charm_path = INTEGRATION_TEST_DIR / 'file-resource-charm'
245+ async with base .CleanModel () as model :
246+ app = await model .deploy (str (charm_path ))
247+ assert 'file-resource-charm' in model .applications
248+
249+ await model .wait_for_idle ()
250+ assert app .units [0 ].agent_status == 'idle'
251+
252+ resources = {"file-res" : "test.file" }
253+ await app .refresh (local_charm_path = str (charm_path ), resources = resources )
254+
255+ await model .wait_for_idle ()
256+ assert app .units [0 ].agent_status == 'idle'
257+
258+ ress = await app .get_resources ()
259+ assert 'file-res' in ress
260+ assert ress ['file-res' ]
261+
262+
240263@base .bootstrapped
241264@pytest .mark .asyncio
242265async def test_trusted (event_loop ):
You can’t perform that action at this time.
0 commit comments