Fix #22: Improve alerting provider tests by mocking HTTP client

This commit is contained in:
TwiN committed 2021-12-02 23:10:21 -05:00
1 parent 6954e9dde7
commit 8c73ae6035
10 files changed
+661

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
package test
import "net/http"
type MockRoundTripper func(r *http.Request) *http.Response
func (f MockRoundTripper) RoundTrip(r *http.Request) (*http.Response, error) {
return f(r), nil
}