Skip to content

Commit b70bf5f

Browse files
Fix mockResourcesClient implementation to match Client interface
Co-Authored-By: [email protected] <[email protected]>
1 parent 8f97ce7 commit b70bf5f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/sourcemaps/upload_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"io"
77
"net/http"
88
"net/http/httptest"
9+
"net/url"
910
"os"
1011
"path/filepath"
1112
"testing"
@@ -19,7 +20,11 @@ type mockResourcesClient struct {
1920
responses map[string][]byte
2021
}
2122

22-
func (m *mockResourcesClient) MakeRequest(accessToken, method, uri, contentType string, body []byte, queryParams map[string]string, followRedirects bool) ([]byte, error) {
23+
func (m *mockResourcesClient) MakeUnauthenticatedRequest(method, uri string, body []byte) ([]byte, error) {
24+
return m.MakeRequest("", method, uri, "application/json", nil, body, false)
25+
}
26+
27+
func (m *mockResourcesClient) MakeRequest(accessToken, method, uri, contentType string, query url.Values, body []byte, isBeta bool) ([]byte, error) {
2328
if response, ok := m.responses[uri]; ok {
2429
return response, nil
2530
}

0 commit comments

Comments
 (0)