Added option to set the base folder for unittests from an environment variable

This commit is contained in:
Kenneth Skovhede
2016-04-06 20:42:12 +02:00
parent 742eab0913
commit e2e645a6a0
+4 -1
View File
@@ -26,7 +26,10 @@ namespace Duplicati.UnitTest
/// <summary>
/// The base folder where all data is trashed around
/// </summary>
protected static readonly string BASEFOLDER = Library.Utility.Utility.ExpandEnvironmentVariables(Path.Combine("~", "testdata"));
protected static readonly string BASEFOLDER =
string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("UNITTEST_BASEFOLDER"))
? Library.Utility.Utility.ExpandEnvironmentVariables(Path.Combine("~", "testdata"))
: Environment.GetEnvironmentVariable("UNITTEST_BASEFOLDER");
/// <summary>
/// The folder path that serves as the backup destination