Fix how we clean the download cache (#170)

This commit is contained in:
Timothy Baldridge 2019-11-14 14:53:29 -07:00 committed by GitHub
parent 0cb6f2fa69
commit 9617ca4982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 16 deletions

1
.gitignore vendored
View File

@ -365,3 +365,4 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder # Ionide (cross platform F# VS Code tools) working folder
.ionide/ .ionide/
/.idea

View File

@ -52,14 +52,8 @@ namespace Wabbajack.Lib.Downloaders
return; return;
} }
if (!status.is_premium) if (status.is_premium) return;
{
Utils.Error($"Automated installs with Wabbajack requires a premium nexus account. {client.Username} is not a premium account."); Utils.Error($"Automated installs with Wabbajack requires a premium nexus account. {client.Username} is not a premium account.");
return;
}
client.ClearUpdatedModsInCache();
//var updated = client.GetModsUpdatedSince(Game.Skyrim,DateTime.Now - TimeSpan.FromDays(30));
} }
public class State : AbstractDownloadState public class State : AbstractDownloadState

View File

@ -14,22 +14,22 @@ namespace Wabbajack.Test.ListValidation
[TestClass] [TestClass]
public class ListValidation public class ListValidation
{ {
[TestInitialize] [ClassInitialize]
public void Setup() public static void SetupNexus()
{ {
Directory.CreateDirectory(Consts.ModListDownloadFolder);
Utils.LogMessages.Subscribe(s => TestContext.WriteLine(s));
var api = new NexusApiClient(); var api = new NexusApiClient();
api.ClearUpdatedModsInCache(); api.ClearUpdatedModsInCache();
} }
private TestContext testContextInstance; [TestInitialize]
public TestContext TestContext public void SetupTest()
{ {
get { return testContextInstance; } Directory.CreateDirectory(Consts.ModListDownloadFolder);
set { testContextInstance = value; } Utils.LogMessages.Subscribe(s => TestContext.WriteLine(s));
} }
public TestContext TestContext { get; set; }
[TestCategory("ListValidation")] [TestCategory("ListValidation")]
[DataTestMethod] [DataTestMethod]
[DynamicData(nameof(GetModLists), DynamicDataSourceType.Method)] [DynamicData(nameof(GetModLists), DynamicDataSourceType.Method)]