Unit tests should only test single actions
Open
@nrc is already working on this.
Since Apr 15, 2020.
difficulty/medium
good first issue
type/enhancement
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
Some of our unit tests are more like integration tests at the moment in that they test more than one stage in the TiUp pipeline. It is better practice to test this sort of thing in integration tests and for unit tests to test small, modular actions. In particular, unit tests should almost never do IO. Doing this will require some mocking of interfaces and extracting interfaces where there are currently only concrete types
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.