Skip to content

Commit 4b4f60c

Browse files
committed
Add integration test for simple assumes expression
This is not the ideal test because it depends on that the upstream charm having the simple assumes: -juju expression. However, simulating the bug in the facade.py for parsing such expressions is non-trivial as we need a test to call something like the CharmsFacade.CharmInfo() to trigger parsing the metadata (which is actually where it fails in the reported bug). Creating a local charm wouldn't work because we locally handle the metadata (wihtout going through anything in the facade.py where the bug is located). Maybe we can manually call AddCharm in the test for a local charm and then manually call the CharmInfo with the returned url.
1 parent da8de1d commit 4b4f60c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/integration/test_model.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ async def test_deploy_local_charm(event_loop):
149149
assert model.units['charm/0'].workload_status == 'active'
150150

151151

152+
@base.bootstrapped
153+
@pytest.mark.asyncio
154+
async def test_deploy_charm_assumes(event_loop):
155+
async with base.CleanModel() as model:
156+
await model.deploy('postgresql', channel='14/edge')
157+
158+
152159
@base.bootstrapped
153160
@pytest.mark.asyncio
154161
async def test_deploy_local_charm_channel(event_loop):

0 commit comments

Comments
 (0)