Skip to content

Use new masonry mocks to add more test coverage to templater #55

Open
@jcscottiii

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions