charmed-kubernetes / pytest-operator

Apache License 2.0
7 stars 13 forks source link

Teardown storage #132

Closed luissimas closed 3 months ago

luissimas commented 6 months ago

Hello!

I'm running some tests on an Openstack cloud and I've noticed that the ops_test fixture does not teardown the storage created by Juju on the model.

AFAIK the destroy_storage parameter on the OpsTest.forget_model method could be the solution, but it is not currently exposed to the user. I couldn't come up with a nice API for exposing this feature in this library (maybe another fixture?). I'd be willing to implement this functionality, but I'm not sure how to expose it to the users.

luissimas commented 6 months ago

Maybe adding a command-line parameter such as --destroy-storage will be the best way to expose this feature.