gatus
gatus copied to clipboard
refactor: Move client.InjectHTTPClient to client.Config
https://github.com/TwiN/gatus/blob/eb4e22e76b55107b285692829561eba5a8fe9d7e/client/client.go#L188
This effectively allows setting a global mocked HTTP client for testing purposes, which, while easy, prevents me from parallelizing the execution of some tests.
We should instead have it as a method of client.Config
https://github.com/TwiN/gatus/blob/eb4e22e76b55107b285692829561eba5a8fe9d7e/client/config.go#L41
func (c *Config) InjectHTTPClient(client *http.Client) {
c.httpClient = client
}
@TwiN Can I try to solve this issue ?