feat(resume downloads): add basic tests

Signed-off-by: Saarthak Verma <saarthakverma739@gmail.com>
This commit is contained in:
Saarthak Verma 2025-01-03 22:02:21 +05:30
parent f16c7cef92
commit d7e88754d4
No known key found for this signature in database
GPG key ID: 2BEFA9EF09A35950
2 changed files with 12 additions and 1 deletions

View file

@ -282,8 +282,12 @@ func (uri URI) DownloadFile(filePath, sha string, fileN, total int, downloadStat
if err != nil {
return fmt.Errorf("failed to create parent directory for file %q: %v", filePath, err)
}
/** Enabling partial downloads
* - Do I remove the partial file
* -
*/
// save partial download to dedicated file
fmt.Printf("DELETEING PARTIAL FILE")
tmpFilePath := filePath + ".partial"
// remove tmp file

View file

@ -38,3 +38,10 @@ var _ = Describe("Gallery API tests", func() {
})
})
})
var _ = Describe("Download Test", func() {
Context("URI", func() {
It("Resumes partially downloaded files")
It("It accurately updates progress")
})
})