mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
fixing linux tests
This commit is contained in:
parent
9330f0aefc
commit
05370518c5
6 changed files with 53 additions and 19 deletions
|
@ -42,13 +42,15 @@ namespace NzbDrone.Common.Test
|
|||
[Test]
|
||||
public void directory_exist_should_be_able_to_find_existing_unc_share()
|
||||
{
|
||||
WindowsOnly();
|
||||
|
||||
Subject.FolderExists(@"\\localhost\c$").Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void directory_exist_should_not_be_able_to_find_none_existing_folder()
|
||||
{
|
||||
Subject.FolderExists(@"C:\ThisBetterNotExist\").Should().BeFalse();
|
||||
Subject.FolderExists(@"C:\ThisBetterNotExist\".AsOsAgnostic()).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -140,20 +142,14 @@ namespace NzbDrone.Common.Test
|
|||
[TestCase(@"\\smallcheese\DRIVE_G\TV-C\Simspsons", @"\\smallcheese\DRIVE_G\TV-C\Simspsons")]
|
||||
public void paths_should_be_equal(string first, string second)
|
||||
{
|
||||
if (first.StartsWith("\\"))
|
||||
{
|
||||
//verify the linux equivalent.
|
||||
DiskProvider.PathEquals(first, second).Should().BeTrue();
|
||||
}
|
||||
|
||||
DiskProvider.PathEquals(first, second).Should().BeTrue();
|
||||
DiskProvider.PathEquals(first.AsOsAgnostic(), second.AsOsAgnostic()).Should().BeTrue();
|
||||
}
|
||||
|
||||
[TestCase(@"D:\Test", @"C:\Test\")]
|
||||
[TestCase(@"D:\Test\Test", @"C:\TestTest\")]
|
||||
[TestCase(@"C:\Test", @"C:\Test2\")]
|
||||
[TestCase(@"C:\Test\Test", @"C:\TestTest\")]
|
||||
public void paths_should_not_be_equal(string first, string second)
|
||||
{
|
||||
DiskProvider.PathEquals(first, second).Should().BeFalse();
|
||||
DiskProvider.PathEquals(first.AsOsAgnostic(), second.AsOsAgnostic()).Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -180,8 +176,8 @@ namespace NzbDrone.Common.Test
|
|||
[Explicit]
|
||||
public void check_last_write()
|
||||
{
|
||||
Console.WriteLine(Subject.GetLastFolderWrite(@"C:\DRIVERS"));
|
||||
Console.WriteLine(new DirectoryInfo(@"C:\DRIVERS").LastWriteTimeUtc);
|
||||
Console.WriteLine(Subject.GetLastFolderWrite(_binFolder.FullName));
|
||||
Console.WriteLine(_binFolder.LastWriteTimeUtc);
|
||||
}
|
||||
|
||||
private void VerifyCopy()
|
||||
|
|
|
@ -8,8 +8,18 @@ namespace NzbDrone.Common.Test.EnsureTest
|
|||
public class PathExtensionFixture : TestBase
|
||||
{
|
||||
[TestCase(@"p:\TV Shows\file with, comma.mkv")]
|
||||
[TestCase(@"\\serer\share\file with, comma.mkv")]
|
||||
public void EnsureWindowsPath(string path)
|
||||
{
|
||||
WindowsOnly();
|
||||
Ensure.That(() => path).IsValidPath();
|
||||
}
|
||||
|
||||
|
||||
[TestCase(@"var/user/file with, comma.mkv")]
|
||||
public void EnsureLinuxPath(string path)
|
||||
{
|
||||
LinuxOnly();
|
||||
Ensure.That(() => path).IsValidPath();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue