mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-09 18:10:29 +00:00
fix: move checksum to HTTP opts, fix mismatch retry, scope get_download_speed to aggregate-only
This commit is contained in:
1 parent
929e2d2d7c
commit
b5e8d61f01
16 files changed
+501
-655
No files matched your search
@@ -0,0 +1,15 @@
|
||||
package http
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestOptsExtra_Checksum(t *testing.T) {
|
||||
extra := &OptsExtra{
|
||||
Checksum: &ChecksumOption{
|
||||
Algorithm: "sha256",
|
||||
Expected: "abcdef1234567890",
|
||||
},
|
||||
}
|
||||
if extra.Checksum.Algorithm != "sha256" || extra.Checksum.Expected != "abcdef1234567890" {
|
||||
t.Fatalf("unexpected checksum: %+v", extra.Checksum)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user