charmed-kubernetes / pytest-operator

Apache License 2.0
6 stars 13 forks source link

Improve handling of lxd group management #38

Closed johnsca closed 2 years ago

johnsca commented 2 years ago

When using destructive mode, or if the user is already a member of the lxd group, then using sg to gain the group is unnecessary and can sometimes lead to issues. Even when needed, if the group is not available, the error message produced is confusing.

This also refactors the tests into separate unit and integration tests, and updates the abort_on_fail autouse fixture to avoid creating an ops_test instance (and thus creating a model) when not needed.