The goal is to be able to add unit-test for snapper CLI commands. For example, check that user-given parameters are right, check that correct libsnapper calls are performed (e.g., a call for creating a snapshot would be perfomed), and check that commands returns expected output (e.g., with csv format, etc).
How to do it
To support unit-test we need to prepare the code for that. And we can do it at different layers. Very roughly, we can see these layers in the snapper code: