envd
envd copied to clipboard
chore(test): Add unit test and integration test
Description
We need set up the test process and add more unit/integration test cases. There are many interfaces in the code, thus it should be easy to mock them and test the main logic.
Acceptance Criteria
- [ ] test for IR and frontend
- [x] test for cache
- [ ] test for docker client
https://github.com/golang/mock can be used to generate the interface mock implementation for test purposes.
What test library do we prefer? For simple unit test, the original test lib is enough; Yet what about e2e test, ginkgo+go mega or goconvey?
Do you have some recommendations? And what's more, can any of these libs achieve incremental testing for ci(cachable)?
We are using ginkgo+go mega in #83 Personally, perfer BDD test cases in unit test and integration test.
what's more, can any of these libs achieve incremental testing for ci(cachable)?
I do not know about it. Do you know that?
I always have some difficult of writing tests, thus I would like give it a shot.
Acceptance Criteria
- [ ] test for IR and frontend
- [x] test for cache
- [ ] test for docker client
up e2e test
dibs
/assign
Closed in #804