Improve API client tests with a mock HTTP server
Open
type/enhancement
type/umbrella-☂️
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
Right now API client "unit" tests require a full agent to be running for testing. We should improve this by having a mock HTTP server which can respond to our API requests without actually running any agent code.
We will still need integration tests to run against the actual binary but hopefully we can do that in a way where we can point it at a random consul version and let it run which would improve our backwards compat testing.
This mock would also allow us to test some of the enterprise endpoints with stubs in OSS without actually pulling the full endpoint into oss (like for licensing).
Contributor guide
Assessment
This issue has not been assessed yet.