Add streaming, subscribe, cancel cleanup, and recovery component tests

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/claude-agent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
Alexander
2026-05-11 15:54:25 +02:00
parent be859e87c0
commit 93821ab214
5 changed files with 1375 additions and 1 deletions
+8
View File
@@ -86,6 +86,7 @@ type mockTorrentClient struct {
FindFunc func(opts torrent.FindOptions) ([]torrent.TorrentInfo, error)
AddTorrentFunc func(file torrent.TorrentFile, savePath string) error
AddMagnetFunc func(magnetURI string, savePath string) error
DeleteTorrentFunc func(hash string) error
DefaultSavePathFunc func() (string, error)
}
@@ -124,6 +125,13 @@ func (m *mockTorrentClient) AddMagnet(magnetURI string, savePath string) error {
return fmt.Errorf("not mocked")
}
func (m *mockTorrentClient) DeleteTorrent(hash string) error {
if m.DeleteTorrentFunc != nil {
return m.DeleteTorrentFunc(hash)
}
return nil
}
func (m *mockTorrentClient) DefaultSavePath() (string, error) {
if m.DefaultSavePathFunc != nil {
return m.DefaultSavePathFunc()