fix: decouple http client from library

This commit is contained in:
Rohan Verma
2019-01-15 16:27:02 +05:30
parent 8b0be7fb53
commit f3fc241849
3 changed files with 23 additions and 16 deletions
-12
View File
@@ -127,18 +127,6 @@ func TestS3_FileDelete(t *testing.T) {
}
}
type MockClient struct {
DoFunc func(req *http.Request) (*http.Response, error)
}
func (m *MockClient) Do(req *http.Request) (*http.Response, error) {
if m.DoFunc != nil {
return m.DoFunc(req)
}
// just in case you want default correct return value
return &http.Response{}, nil
}
func TestS3_NewUsingIAM(t *testing.T) {
var (
iam = `test-new-s3-using-iam`