mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix a few more broken tests
This commit is contained in:
parent
c22e40f752
commit
220382a3a8
@ -19,6 +19,7 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
private Task _task;
|
private Task _task;
|
||||||
|
|
||||||
public readonly TempFolder _severTempFolder = new TempFolder();
|
public readonly TempFolder _severTempFolder = new TempFolder();
|
||||||
|
private bool _disposed = false;
|
||||||
public AbsolutePath ServerTempFolder => _severTempFolder.Dir;
|
public AbsolutePath ServerTempFolder => _severTempFolder.Dir;
|
||||||
|
|
||||||
|
|
||||||
@ -43,6 +44,11 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
Consts.WabbajackBuildServerUri = new Uri("http://localhost:8080");
|
Consts.WabbajackBuildServerUri = new Uri("http://localhost:8080");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~BuildServerFixture()
|
||||||
|
{
|
||||||
|
Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
public T GetService<T>()
|
public T GetService<T>()
|
||||||
{
|
{
|
||||||
return (T)_host.Services.GetService(typeof(T));
|
return (T)_host.Services.GetService(typeof(T));
|
||||||
@ -50,6 +56,8 @@ namespace Wabbajack.BuildServer.Test
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
|
if (_disposed) return;
|
||||||
|
_disposed = true;
|
||||||
if (!_token.IsCancellationRequested)
|
if (!_token.IsCancellationRequested)
|
||||||
_token.Cancel();
|
_token.Cancel();
|
||||||
|
|
||||||
|
@ -164,9 +164,6 @@ namespace Wabbajack.BuildServer.Models.Jobs
|
|||||||
Utils.Log(ex.ToString());
|
Utils.Log(ex.ToString());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<bool> ValidateNexusFast(DBContext db, NexusDownloader.State state)
|
private async Task<bool> ValidateNexusFast(DBContext db, NexusDownloader.State state)
|
||||||
@ -192,7 +189,7 @@ namespace Wabbajack.BuildServer.Models.Jobs
|
|||||||
.FirstOrDefault(file => file.file_id == state.FileID && file.category_name != null);
|
.FirstOrDefault(file => file.file_id == state.FileID && file.category_name != null);
|
||||||
return found != null;
|
return found != null;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ namespace Wabbajack.BuildServer.Model.Models
|
|||||||
{
|
{
|
||||||
public class SqlService
|
public class SqlService
|
||||||
{
|
{
|
||||||
private IConfiguration _configuration;
|
|
||||||
private AppSettings _settings;
|
private AppSettings _settings;
|
||||||
|
|
||||||
public SqlService(AppSettings settings)
|
public SqlService(AppSettings settings)
|
||||||
|
@ -28,7 +28,6 @@ using Wabbajack.BuildServer.Controllers;
|
|||||||
using Wabbajack.BuildServer.Models;
|
using Wabbajack.BuildServer.Models;
|
||||||
using Microsoft.AspNetCore.Mvc.NewtonsoftJson;
|
using Microsoft.AspNetCore.Mvc.NewtonsoftJson;
|
||||||
using Microsoft.AspNetCore.StaticFiles;
|
using Microsoft.AspNetCore.StaticFiles;
|
||||||
using Wabbajack.BuildServer.Controllers;
|
|
||||||
using Microsoft.Extensions.FileProviders;
|
using Microsoft.Extensions.FileProviders;
|
||||||
using Wabbajack.BuildServer.Model.Models;
|
using Wabbajack.BuildServer.Model.Models;
|
||||||
using Directory = System.IO.Directory;
|
using Directory = System.IO.Directory;
|
||||||
|
Loading…
Reference in New Issue
Block a user