mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Require 100MB extra for import
This commit is contained in:
parent
fca4d20046
commit
5fe78ba7bf
@ -63,6 +63,16 @@ public void should_reject_when_there_isnt_enough_disk_space()
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_reject_when_there_isnt_enough_space_for_file_plus_100mb_padding()
|
||||
{
|
||||
GivenFileSize(100.Megabytes());
|
||||
GivenFreeSpace(150.Megabytes());
|
||||
|
||||
Subject.IsSatisfiedBy(_localEpisode).Should().BeFalse();
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_accept_when_there_is_enough_disk_space()
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ public bool IsSatisfiedBy(LocalEpisode localEpisode)
|
||||
|
||||
var freeSpace = _diskProvider.GetAvilableSpace(destinationFilename);
|
||||
|
||||
if (freeSpace < localEpisode.Size)
|
||||
if (freeSpace < localEpisode.Size + 100.Megabytes())
|
||||
{
|
||||
_logger.Warn("Not enough free space to import: {0}", localEpisode);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user