Fix #22: Improve alerting provider tests by mocking HTTP client
This commit is contained in:
1 parent
6954e9dde7
commit
8c73ae6035
10 files changed
+661
No files matched your search
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user