1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 22:22:59 +08:00

Remove unnecessary comments and added file check for tournament.ini on test start

This commit is contained in:
Shivam 2020-06-22 12:22:59 +02:00
parent 291dadf0b2
commit eec1e9ef4d

View File

@ -78,10 +78,13 @@ namespace osu.Game.Tournament.Tests.NonVisual
{ {
using (HeadlessGameHost host = new HeadlessGameHost(nameof(TestMigration))) using (HeadlessGameHost host = new HeadlessGameHost(nameof(TestMigration)))
{ {
// Recreate the old setup that uses "tournament" as the base path.
string osuRoot = basePath(nameof(TestMigration)); string osuRoot = basePath(nameof(TestMigration));
string configFile = Path.Combine(osuRoot, "tournament.ini");
// Define all the paths for the old scenario if (File.Exists(configFile))
File.Delete(configFile);
// Recreate the old setup that uses "tournament" as the base path.
string oldPath = Path.Combine(osuRoot, "tournament"); string oldPath = Path.Combine(osuRoot, "tournament");
string videosPath = Path.Combine(oldPath, "videos"); string videosPath = Path.Combine(oldPath, "videos");
string modsPath = Path.Combine(oldPath, "mods"); string modsPath = Path.Combine(oldPath, "mods");
@ -141,7 +144,6 @@ namespace osu.Game.Tournament.Tests.NonVisual
} }
finally finally
{ {
// Cleaning up after ourselves.
host.Storage.Delete("tournament.ini"); host.Storage.Delete("tournament.ini");
host.Storage.DeleteDirectory("tournaments"); host.Storage.DeleteDirectory("tournaments");
host.Exit(); host.Exit();