Skip to content

Commit 1caed77

Browse files
committed
Test and fix for remove_storage_pool
1 parent 000af36 commit 1caed77

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

juju/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ async def remove_storage_pool(self, name):
914914
:return:
915915
"""
916916
storage_facade = client.StorageFacade.from_connection(self.connection())
917-
return await storage_facade.RemovePool(pools=[name])
917+
return await storage_facade.RemovePool(pools=[client.StoragePoolDeleteArg(name)])
918918

919919
async def update_storage_pool(self, name, attributes=""):
920920
""" Update storage pool attributes.

tests/integration/test_model.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,3 +1089,8 @@ async def test_storage_pools(event_loop):
10891089
await model.create_storage_pool("test-pool", "lxd")
10901090
pools = await model.list_storage_pools()
10911091
assert "test-pool" in [p['name'] for p in pools]
1092+
1093+
await model.remove_storage_pool("test-pool")
1094+
await jasyncio.sleep(5)
1095+
pools = await model.list_storage_pools()
1096+
assert "test-pool" not in [p['name'] for p in pools]

0 commit comments

Comments
 (0)