Skip to content

Commit 915ae88

Browse files
Fix CI failures in sourcemap upload tests
Co-Authored-By: [email protected] <[email protected]>
1 parent 5cf57d5 commit 915ae88

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/sourcemaps/upload_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package sourcemaps
22

33
import (
44
"encoding/json"
5+
"io"
56
"net/http"
67
"net/http/httptest"
78
"os"
@@ -113,7 +114,7 @@ func TestUploadFile(t *testing.T) {
113114
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
114115
assert.Equal(t, http.MethodPut, r.Method)
115116

116-
body, err := os.ReadAll(r.Body)
117+
body, err := io.ReadAll(r.Body)
117118
assert.NoError(t, err)
118119
assert.Equal(t, "test content", string(body))
119120

@@ -154,8 +155,6 @@ func TestNewUploadCmd(t *testing.T) {
154155

155156
func TestRunE(t *testing.T) {
156157
client := resources.NewClient("")
157-
cmd := &cobra.Command{}
158-
args := []string{}
159158

160159
tempDir, err := os.MkdirTemp("", "sourcemap-test")
161160
assert.NoError(t, err)

0 commit comments

Comments
 (0)