Server side fixes, latest changes to SQL

This commit is contained in:
Timothy Baldridge 2020-12-29 20:59:22 -07:00
parent f82b55a832
commit a551b8e2b4
3 changed files with 788 additions and 632 deletions

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@ using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using Newtonsoft.Json;
using Wabbajack.BuildServer;
using Wabbajack.Lib.LibCefHelpers;
using Wabbajack.Server.DataLayer;
using Wabbajack.Server.Services;
@ -36,6 +37,7 @@ namespace Wabbajack.Server
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
Helpers.Init();
/*services.AddSwaggerGen(c =>
{
c.SwaggerDoc("v1", new OpenApiInfo {Title = "Wabbajack Build API", Version = "v1"});

View File

@ -281,6 +281,21 @@ namespace Wabbajack.Test
Assert.Equal(Hash.FromBase64("2lZt+1h6wxM="), await filename.Path.FileHashAsync());
}
[Fact]
public async Task CanFindOtherLLMods()
{
await DownloadDispatcher.GetInstance<LoversLabDownloader>().Prepare();
var ini = @"[General]
directURL=https://www.loverslab.com/files/file/1382-milk-mod-economy/?do=download&r=913360&confirm=1&t=1&csrfKey=7984faa4d27f6b638125daf38ae5f1191";
var state = (AbstractDownloadState)await DownloadDispatcher.ResolveArchive(ini.LoadIniString());
var otherfiles = await ((LoversLabDownloader.State)state).GetFilesInGroup();
}
[Fact]
public async Task LoversLabDownload()
{
@ -316,6 +331,8 @@ namespace Wabbajack.Test
Assert.Equal("Cheese for Everyone!", await filename.Path.ReadAllTextAsync());
var files = await ((LoversLabDownloader.State)converted).GetFilesInGroup();
Assert.NotEmpty(files);
Assert.Equal("WABBAJACK_TEST_FILE.zip", files.First().Name);