envd icon indicating copy to clipboard operation
envd copied to clipboard

chore(test): Add unit test and integration test

Open gaocegege opened this issue 3 years ago โ€ข 7 comments
trafficstars

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

gaocegege avatar Apr 22 '22 02:04 gaocegege

https://github.com/golang/mock can be used to generate the interface mock implementation for test purposes.

gaocegege avatar Apr 25 '22 05:04 gaocegege

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)?

Thrimbda avatar May 02 '22 04:05 Thrimbda

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?

gaocegege avatar May 02 '22 07:05 gaocegege

I always have some difficult of writing tests, thus I would like give it a shot.

Thrimbda avatar May 02 '22 11:05 Thrimbda

Acceptance Criteria

  • [ ] test for IR and frontend
  • [x] test for cache
  • [ ] test for docker client

gaocegege avatar May 15 '22 10:05 gaocegege

up e2e test

gaocegege avatar May 16 '22 03:05 gaocegege

dibs

/assign

gaocegege avatar May 16 '22 07:05 gaocegege

Closed in #804

VoVAllen avatar Aug 26 '22 06:08 VoVAllen

VoVAllen avatar Aug 26 '22 06:08 VoVAllen