Fixed some mono specific tests.
This commit is contained in:
parent
f7bdf635b3
commit
52a71a4e96
|
@ -147,13 +147,12 @@ namespace NzbDrone.Core.Update
|
||||||
|
|
||||||
if (scriptPath.IsNullOrWhiteSpace())
|
if (scriptPath.IsNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Update Script has not been defined");
|
throw new UpdateFailedException("Update Script has not been defined");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_diskProvider.FileExists(scriptPath, StringComparison.Ordinal))
|
if (!_diskProvider.FileExists(scriptPath, StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
var message = String.Format("Update Script: '{0}' does not exist", scriptPath);
|
throw new UpdateFailedException("Update Script: '{0}' does not exist", scriptPath);
|
||||||
throw new FileNotFoundException(message, scriptPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.Info("Removing NzbDrone.Update");
|
_logger.Info("Removing NzbDrone.Update");
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using Mono.Unix;
|
using System;
|
||||||
|
using Mono.Unix;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using NzbDrone.Common.Test.DiskTests;
|
using NzbDrone.Common.Test.DiskTests;
|
||||||
|
|
||||||
|
@ -15,6 +16,11 @@ namespace NzbDrone.Mono.Test.DiskProviderTests
|
||||||
|
|
||||||
protected override void SetWritePermissions(string path, bool writable)
|
protected override void SetWritePermissions(string path, bool writable)
|
||||||
{
|
{
|
||||||
|
if (Environment.UserName == "root")
|
||||||
|
{
|
||||||
|
Assert.Inconclusive("Need non-root user to test write permissions.");
|
||||||
|
}
|
||||||
|
|
||||||
// Remove Write permissions, we're still owner so we can clean it up, but we'll have to do that explicitly.
|
// Remove Write permissions, we're still owner so we can clean it up, but we'll have to do that explicitly.
|
||||||
|
|
||||||
var entry = UnixFileSystemInfo.GetFileSystemEntry(path);
|
var entry = UnixFileSystemInfo.GetFileSystemEntry(path);
|
||||||
|
|
Loading…
Reference in New Issue