mirror of https://github.com/ppy/osu
Ensure test directories are deleted before subsequent run
This commit is contained in:
parent
0690d81bbb
commit
7641507c90
|
@ -233,6 +233,9 @@ public void TestMigrationToNestedTargetFails()
|
||||||
|
|
||||||
string subFolder = Path.Combine(customPath, "sub");
|
string subFolder = Path.Combine(customPath, "sub");
|
||||||
|
|
||||||
|
if (Directory.Exists(subFolder))
|
||||||
|
Directory.Delete(subFolder, true);
|
||||||
|
|
||||||
Directory.CreateDirectory(subFolder);
|
Directory.CreateDirectory(subFolder);
|
||||||
|
|
||||||
Assert.Throws<ArgumentException>(() => osu.Migrate(subFolder));
|
Assert.Throws<ArgumentException>(() => osu.Migrate(subFolder));
|
||||||
|
@ -255,11 +258,14 @@ public void TestMigrationToSeeminglyNestedTarget()
|
||||||
|
|
||||||
Assert.DoesNotThrow(() => osu.Migrate(customPath));
|
Assert.DoesNotThrow(() => osu.Migrate(customPath));
|
||||||
|
|
||||||
string subFolder = customPath + "sub";
|
string seeminglySubFolder = customPath + "sub";
|
||||||
|
|
||||||
Directory.CreateDirectory(subFolder);
|
if (Directory.Exists(seeminglySubFolder))
|
||||||
|
Directory.Delete(seeminglySubFolder, true);
|
||||||
|
|
||||||
osu.Migrate(subFolder);
|
Directory.CreateDirectory(seeminglySubFolder);
|
||||||
|
|
||||||
|
osu.Migrate(seeminglySubFolder);
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue