mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-31 11:22:06 +00:00
Update now moves the update package to target folder, should make updates faster.
This commit is contained in:
parent
950b2f0965
commit
373b3ab075
2 changed files with 6 additions and 6 deletions
|
@ -130,7 +130,7 @@ public void should_create_backup_of_current_installation()
|
|||
public void should_copy_update_package_to_target()
|
||||
{
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER));
|
||||
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER));
|
||||
|
||||
Mocker.Resolve<UpdateProvider>().Start(TARGET_FOLDER);
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public void should_copy_update_package_to_target()
|
|||
public void should_restore_if_update_fails()
|
||||
{
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER))
|
||||
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER))
|
||||
.Throws(new IOException());
|
||||
|
||||
//Act
|
||||
|
@ -184,7 +184,7 @@ public void should_restart_service_if_service_was_running_and_update_fails()
|
|||
WithServiceRunning(true);
|
||||
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER))
|
||||
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER))
|
||||
.Throws(new IOException());
|
||||
|
||||
//Act
|
||||
|
@ -202,7 +202,7 @@ public void should_restart_process_if_service_was_not_running_and_update_fails()
|
|||
WithServiceRunning(false);
|
||||
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(c => c.CopyDirectory(UPDATE_FOLDER, TARGET_FOLDER))
|
||||
.Setup(c => c.MoveDirectory(UPDATE_FOLDER, TARGET_FOLDER))
|
||||
.Throws(new IOException());
|
||||
|
||||
//Act
|
||||
|
|
|
@ -68,11 +68,11 @@ public virtual void Start(string targetFolder)
|
|||
_diskProvider.CopyDirectory(targetFolder, _enviromentProvider.GetUpdateBackUpFolder());
|
||||
|
||||
|
||||
logger.Info("Copying update package to target");
|
||||
logger.Info("Moving update package to target");
|
||||
|
||||
try
|
||||
{
|
||||
_diskProvider.CopyDirectory(_enviromentProvider.GetUpdatePackageFolder(), targetFolder);
|
||||
_diskProvider.MoveDirectory(_enviromentProvider.GetUpdatePackageFolder(), targetFolder);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue