mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(macros): add IndexerName
(#1511)
* feat(macros): add IndexerName * fix: tests * fix: tests
This commit is contained in:
parent
c43e2c76d6
commit
3c3b47fa10
37 changed files with 310 additions and 235 deletions
|
@ -93,7 +93,7 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
ID int64
|
||||
FilterStatus ReleaseFilterStatus
|
||||
Rejections []string
|
||||
Indexer string
|
||||
Indexer IndexerMinimal
|
||||
FilterName string
|
||||
Protocol ReleaseProtocol
|
||||
Implementation ReleaseImplementation
|
||||
|
@ -151,7 +151,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
{
|
||||
name: "401",
|
||||
fields: fields{
|
||||
Indexer: "mock-indexer",
|
||||
Indexer: IndexerMinimal{
|
||||
ID: 0,
|
||||
Name: "Mock Indexer",
|
||||
Identifier: "mock-indexer",
|
||||
},
|
||||
TorrentName: "Test.Release-GROUP",
|
||||
DownloadURL: fmt.Sprintf("%s/%d", ts.URL, 401),
|
||||
Protocol: ReleaseProtocolTorrent,
|
||||
|
@ -161,7 +165,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
{
|
||||
name: "403",
|
||||
fields: fields{
|
||||
Indexer: "mock-indexer",
|
||||
Indexer: IndexerMinimal{
|
||||
ID: 0,
|
||||
Name: "Mock Indexer",
|
||||
Identifier: "mock-indexer",
|
||||
},
|
||||
TorrentName: "Test.Release-GROUP",
|
||||
DownloadURL: fmt.Sprintf("%s/%d", ts.URL, 403),
|
||||
Protocol: ReleaseProtocolTorrent,
|
||||
|
@ -171,7 +179,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
{
|
||||
name: "500",
|
||||
fields: fields{
|
||||
Indexer: "mock-indexer",
|
||||
Indexer: IndexerMinimal{
|
||||
ID: 0,
|
||||
Name: "Mock Indexer",
|
||||
Identifier: "mock-indexer",
|
||||
},
|
||||
TorrentName: "Test.Release-GROUP",
|
||||
DownloadURL: fmt.Sprintf("%s/%d", ts.URL, 500),
|
||||
Protocol: ReleaseProtocolTorrent,
|
||||
|
@ -181,7 +193,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
{
|
||||
name: "ok",
|
||||
fields: fields{
|
||||
Indexer: "mock-indexer",
|
||||
Indexer: IndexerMinimal{
|
||||
ID: 0,
|
||||
Name: "Mock Indexer",
|
||||
Identifier: "mock-indexer",
|
||||
},
|
||||
TorrentName: "Test.Release-GROUP",
|
||||
DownloadURL: fmt.Sprintf("%s/%s", ts.URL, "file.torrent"),
|
||||
Protocol: ReleaseProtocolTorrent,
|
||||
|
@ -191,7 +207,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
{
|
||||
name: "valid_torrent_with_text-html_header",
|
||||
fields: fields{
|
||||
Indexer: "mock-indexer",
|
||||
Indexer: IndexerMinimal{
|
||||
ID: 0,
|
||||
Name: "Mock Indexer",
|
||||
Identifier: "mock-indexer",
|
||||
},
|
||||
TorrentName: "Test.Release-GROUP",
|
||||
DownloadURL: fmt.Sprintf("%s/files/%s", ts.URL, "valid_torrent_as_html"),
|
||||
Protocol: ReleaseProtocolTorrent,
|
||||
|
@ -201,7 +221,11 @@ func TestRelease_DownloadTorrentFile(t *testing.T) {
|
|||
{
|
||||
name: "invalid_torrent_with_text-html_header",
|
||||
fields: fields{
|
||||
Indexer: "mock-indexer",
|
||||
Indexer: IndexerMinimal{
|
||||
ID: 0,
|
||||
Name: "Mock Indexer",
|
||||
Identifier: "mock-indexer",
|
||||
},
|
||||
TorrentName: "Test.Release-GROUP",
|
||||
DownloadURL: fmt.Sprintf("%s/files/%s", ts.URL, "invalid_torrent_as_html"),
|
||||
Protocol: ReleaseProtocolTorrent,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue