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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user