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/
/.idea

View File

@ -52,14 +52,8 @@ namespace Wabbajack.Lib.Downloaders
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.");
return;
}
client.ClearUpdatedModsInCache();
//var updated = client.GetModsUpdatedSince(Game.Skyrim,DateTime.Now - TimeSpan.FromDays(30));
}
public class State : AbstractDownloadState

View File

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