diff --git a/src/internal/packager2/layout/create_test.go b/src/internal/packager2/layout/create_test.go index 044985234d..57b038a0e8 100644 --- a/src/internal/packager2/layout/create_test.go +++ b/src/internal/packager2/layout/create_test.go @@ -111,8 +111,9 @@ func TestSplitDeleteExistingFiles(t *testing.T) { require.NoError(t, err) // Create many fake split files for i := range 15 { - _, err := os.Create(fmt.Sprintf("%s.part%03d", inputFilename, i)) + f, err := os.Create(fmt.Sprintf("%s.part%03d", inputFilename, i)) require.NoError(t, err) + require.NoError(t, f.Close()) } chunkSize := 20