mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 18:28:19 +00:00
Fixed: Disabled transactional file transfers since we don't want that feature in master yet.
This commit is contained in:
parent
bfa629f431
commit
ada5919136
2 changed files with 19 additions and 0 deletions
|
@ -30,6 +30,21 @@ namespace NzbDrone.Common.Test.DiskTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
public void should_not_use_verified_transfer()
|
||||||
|
{
|
||||||
|
Subject.VerificationMode.Should().Be(DiskTransferVerificationMode.VerifyOnly);
|
||||||
|
|
||||||
|
var result = Subject.TransferFile(_sourcePath, _targetPath, TransferMode.Move);
|
||||||
|
|
||||||
|
Mocker.GetMock<IDiskProvider>()
|
||||||
|
.Verify(v => v.TryCreateHardLink(_sourcePath, _backupPath), Times.Never());
|
||||||
|
|
||||||
|
Mocker.GetMock<IDiskProvider>()
|
||||||
|
.Verify(v => v.MoveFile(_sourcePath, _targetPath, false), Times.Once());
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
[Ignore("Disabled verified transfer temporarily.")]
|
||||||
public void should_use_verified_transfer_on_mono()
|
public void should_use_verified_transfer_on_mono()
|
||||||
{
|
{
|
||||||
MonoOnly();
|
MonoOnly();
|
||||||
|
@ -38,6 +53,7 @@ namespace NzbDrone.Common.Test.DiskTests
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
[Ignore("Disabled verified transfer temporarily.")]
|
||||||
public void should_not_use_verified_transfer_on_windows()
|
public void should_not_use_verified_transfer_on_windows()
|
||||||
{
|
{
|
||||||
WindowsOnly();
|
WindowsOnly();
|
||||||
|
|
|
@ -41,6 +41,9 @@ namespace NzbDrone.Common.Disk
|
||||||
// TODO: Atm we haven't seen partial transfers on windows so we disable verified transfer.
|
// TODO: Atm we haven't seen partial transfers on windows so we disable verified transfer.
|
||||||
// (If enabled in the future, be sure to check specifically for ReFS, which doesn't support hardlinks.)
|
// (If enabled in the future, be sure to check specifically for ReFS, which doesn't support hardlinks.)
|
||||||
VerificationMode = OsInfo.IsWindows ? DiskTransferVerificationMode.VerifyOnly : DiskTransferVerificationMode.Transactional;
|
VerificationMode = OsInfo.IsWindows ? DiskTransferVerificationMode.VerifyOnly : DiskTransferVerificationMode.Transactional;
|
||||||
|
|
||||||
|
// TODO: Disabled the transactional logic entirely coz we have a couple of potential issues which we don't want in master.
|
||||||
|
VerificationMode = DiskTransferVerificationMode.VerifyOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransferMode TransferFolder(String sourcePath, String targetPath, TransferMode mode, bool verified = true)
|
public TransferMode TransferFolder(String sourcePath, String targetPath, TransferMode mode, bool verified = true)
|
||||||
|
|
Loading…
Reference in a new issue