You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently almost every buildpack that uses libcnb and has tests has to write code to create mock contexts etc. We should consider adding this to the existing set of mocks.
We should also consider adding utilities for integration testing buildpacks (possibly in a separate library) that possibly uses pack and docker. Example of something like this https://github.com/paketo-buildpacks/occam
The text was updated successfully, but these errors were encountered:
I'm going to split the second part of this into a separate issue. See #259.
I'd like to see this for v2, and I have some ideas.
In Paketo tests, we frequently need to create some part of the context & layers by making temp directories. It would be nice to have some convenient API to build that for tests. It'll be more of a stub than a mock, but I think it could be beneficial & reduce test code.
We've also used Gomega in testing for libcnb. I think it might be helpful to add some Gomega matchers for common assertions. This could reduce code in tests as well.
That's off the top of my head. I'm going to look through Paketo buildpacks more and see what else jumps out as possibilities for reducing boiler plate code in tests.
@samj1912 Let me know if you had other ideas in mind here too. Thanks
Currently almost every buildpack that uses libcnb and has tests has to write code to create mock contexts etc. We should consider adding this to the existing set of mocks.
We should also consider adding utilities for integration testing buildpacks (possibly in a separate library) that possibly uses pack and docker. Example of something like this https://github.com/paketo-buildpacks/occamThe text was updated successfully, but these errors were encountered: