mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 17:40:28 +00:00
feat(protocol): add FTP, FTPS and FTPES downloads (#1569)
This commit is contained in:
1 parent
e0951de270
commit
c0b70d319d
54 files changed
+3850
-38
No files matched your search
@@ -23,6 +23,22 @@ void main() {
|
||||
expect(stats.connections.last.completed, isTrue);
|
||||
});
|
||||
|
||||
test('FTP stats use the HTTP connection layout', () {
|
||||
final stats =
|
||||
TaskStats.fromJson(Protocol.ftp, {
|
||||
'snapshot': {
|
||||
'connections': [
|
||||
{'downloaded': 512, 'total': 1024, 'completed': false, 'failed': false, 'retryTimes': 1},
|
||||
],
|
||||
},
|
||||
'runtime': null,
|
||||
})
|
||||
as HttpTaskStats;
|
||||
|
||||
expect(stats.connections.single.downloaded, 512);
|
||||
expect(stats.connections.single.retryTimes, 1);
|
||||
});
|
||||
|
||||
test('BT stats decode the ordered completion bitset and peer transport', () {
|
||||
final stats =
|
||||
TaskStats.fromJson(Protocol.bt, {
|
||||
|
||||
Reference in new issue
Block a user