diff --git a/.golangci.yml b/.golangci.yml index e2b4b2f..34d5eac 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,13 +1,3 @@ -run: - # timeout for analysis, e.g. 30s, 5m, default is 1m - deadline: 30s - - # exit code when at least one issue was found, default is 1 - issues-exit-code: 1 - - # include test files or not, default is true - tests: true - # all available settings of specific linters linters-settings: gocyclo: diff --git a/reader_test.go b/reader_test.go index 4cfcf6e..8e6d05e 100644 --- a/reader_test.go +++ b/reader_test.go @@ -187,6 +187,12 @@ func TestFullGetRead(t *testing.T) { src, err := randomFile(11325) assert.NoError(t, err) + srcBuf, err := io.ReadAll(src) + assert.NoError(t, err) + + _, err = src.Seek(0, io.SeekStart) + assert.NoError(t, err) + err = srv.ServeFileReader(context.Background(), fileID, src) assert.NoError(t, err) @@ -196,11 +202,6 @@ func TestFullGetRead(t *testing.T) { resp, err := http.DefaultClient.Do(req) assert.NoError(t, err) - _, err = src.Seek(0, io.SeekStart) - assert.NoError(t, err) - srcBuf, err := io.ReadAll(src) - assert.NoError(t, err) - file, err := io.ReadAll(resp.Body) assert.NoError(t, err) _ = resp.Body.Close()