Open
Description
Prior to using mocks, testing had to be done by using real fixture data. This is ok for 1 or 2 cases but to get an exhaustive test suite, it can be burdensome to create that many fixtures and will bloat the repository.
The code in masonry has been refactored to separate a reusable lib
vs the logic for it's internal commands. Inside that reusable lib
, there exists mocks now. With these mocks, it'll be easier to test more cases.
In addition, test coverage should be setup (e.g. codecov like in compliance-masonry)
References:
New Mocks:
https://github.com/opencontrol/compliance-masonry/tree/master/lib/common/mocks
Example of using the mocks:
https://github.com/opencontrol/compliance-masonry/blob/master/exampleplugin/example_test.go#L37
Activity