mirror of https://github.com/Sonarr/Sonarr
removed UGuid leftovers.
This commit is contained in:
parent
4da6654440
commit
c357d062d3
|
@ -19,8 +19,6 @@ namespace NzbDrone.Core.Test.UpdateTests
|
||||||
{
|
{
|
||||||
private string _sandboxFolder;
|
private string _sandboxFolder;
|
||||||
|
|
||||||
private readonly Guid _clientGuid = Guid.NewGuid();
|
|
||||||
|
|
||||||
private readonly UpdatePackage _updatePackage = new UpdatePackage
|
private readonly UpdatePackage _updatePackage = new UpdatePackage
|
||||||
{
|
{
|
||||||
FileName = "NzbDrone.kay.one.0.6.0.2031.zip",
|
FileName = "NzbDrone.kay.one.0.6.0.2031.zip",
|
||||||
|
@ -100,19 +98,12 @@ namespace NzbDrone.Core.Test.UpdateTests
|
||||||
[Test]
|
[Test]
|
||||||
public void should_start_update_client()
|
public void should_start_update_client()
|
||||||
{
|
{
|
||||||
var updateClientPath = Mocker.GetMock<IEnvironmentProvider>().Object.GetUpdateClientExePath();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Subject.Execute(new ApplicationUpdateCommand());
|
Subject.Execute(new ApplicationUpdateCommand());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mocker.GetMock<IProcessProvider>().Verify(
|
Mocker.GetMock<IProcessProvider>().Verify(
|
||||||
c => c.Start(It.Is<ProcessStartInfo>(p =>
|
c => c.Start(It.Is<ProcessStartInfo>(p =>
|
||||||
p.FileName == updateClientPath &&
|
!string.IsNullOrWhiteSpace(p.FileName) &&
|
||||||
p.Arguments == "12 " + _clientGuid.ToString())
|
p.Arguments == "12")));
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
|
|
@ -76,7 +76,7 @@ namespace NzbDrone.Core.Update
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = _environmentProvider.GetUpdateClientExePath(),
|
FileName = _environmentProvider.GetUpdateClientExePath(),
|
||||||
Arguments = string.Format("{0} {1}", _processProvider.GetCurrentProcess().Id)
|
Arguments = _processProvider.GetCurrentProcess().Id.ToString()
|
||||||
};
|
};
|
||||||
|
|
||||||
var process = _processProvider.Start(startInfo);
|
var process = _processProvider.Start(startInfo);
|
||||||
|
|
|
@ -53,9 +53,9 @@ namespace NzbDrone.Update
|
||||||
private int ParseProcessId(string[] args)
|
private int ParseProcessId(string[] args)
|
||||||
{
|
{
|
||||||
int id;
|
int id;
|
||||||
if (args ==null || !Int32.TryParse(args[0], out id) || id <= 0)
|
if (args == null || !Int32.TryParse(args[0], out id) || id <= 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentOutOfRangeException("Invalid process id: " + args[0]);
|
throw new ArgumentOutOfRangeException("args", "Invalid process ID");
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Debug("NzbDrone processId:{0}", id);
|
logger.Debug("NzbDrone processId:{0}", id);
|
||||||
|
|
Loading…
Reference in New Issue