mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
More test fixes
This commit is contained in:
parent
091f342709
commit
b181d48722
@ -5,7 +5,6 @@ using System.Reactive.Disposables;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wabbajack.Common
|
||||
{
|
||||
public class AsyncLock
|
||||
|
@ -98,11 +98,13 @@ namespace Wabbajack.Lib.Downloaders
|
||||
var bufferSize = 1024 * 32;
|
||||
|
||||
Utils.Status($"Starting Download {a.Name ?? Url}", Percent.Zero);
|
||||
var response = await client.GetAsync(Url);
|
||||
var response = await client.GetAsync(Url, errorsAsExceptions:false, retry:false);
|
||||
TOP:
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Stream stream;
|
||||
try
|
||||
|
@ -170,7 +170,8 @@ namespace Wabbajack.BuildServer.Test
|
||||
|
||||
Consts.ModlistSummaryURL = MakeURL("lists/status.json");
|
||||
Consts.ServerWhitelistURL = MakeURL("ServerWhitelist.yaml");
|
||||
|
||||
Consts.UnlistedModlistMetadataURL = MakeURL("lists/none.json");
|
||||
|
||||
}
|
||||
|
||||
public WorkQueue Queue { get; set; }
|
||||
|
@ -4,6 +4,7 @@ using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Dapper;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Lib;
|
||||
using Wabbajack.Lib.Downloaders;
|
||||
@ -54,6 +55,10 @@ namespace Wabbajack.BuildServer.Test
|
||||
[Fact]
|
||||
public async Task CanValidateModLists()
|
||||
{
|
||||
var sql = Fixture.GetService<SqlService>();
|
||||
await using var conn = await sql.Open();
|
||||
await conn.ExecuteAsync("DELETE from Patches");
|
||||
|
||||
var modlists = await MakeModList("CanValidateModlistsFile.txt");
|
||||
Consts.ModlistMetadataURL = modlists.ToString();
|
||||
Utils.Log("Updating modlists");
|
||||
|
@ -170,6 +170,10 @@ namespace Wabbajack.Server.Services
|
||||
var lst = p.Split("_", StringSplitOptions.RemoveEmptyEntries).Select(Hash.FromHex).ToArray();
|
||||
return (lst[0], lst[1]);
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
return default;
|
||||
}
|
||||
catch (FormatException ex)
|
||||
{
|
||||
return default;
|
||||
|
Loading…
Reference in New Issue
Block a user