mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add witcher 3 to the games metadata (prep for ZeroManagerInstaller)
This commit is contained in:
parent
8f12580f50
commit
79c1044e34
@ -30,7 +30,8 @@ namespace Wabbajack.Common
|
||||
Fallout4VR,
|
||||
//MO2 Non-BGS Games
|
||||
[Description("Darkest Dungeon")]
|
||||
DarkestDungeon
|
||||
DarkestDungeon,
|
||||
Witcher3
|
||||
}
|
||||
|
||||
public static class GameExtensions
|
||||
@ -433,7 +434,22 @@ namespace Wabbajack.Common
|
||||
},
|
||||
MainExecutable = "_windows\\Darkest.exe"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
Game.Witcher3, new GameMetaData
|
||||
{
|
||||
Game = Game.Witcher3,
|
||||
NexusName = "witcher3",
|
||||
NexusGameId = 952,
|
||||
SteamIDs = new List<int>{292030, 499450}, // normal and GotY
|
||||
GOGIDs = new List<int>{1207664643, 1495134320, 1207664663, 1640424747}, // normal, GotY and both in packages
|
||||
RequiredFiles = new List<string>
|
||||
{
|
||||
"bin\\x64\\witcher3.exe"
|
||||
},
|
||||
MainExecutable = @"bin\x64\witcher3.exe"
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ namespace Wabbajack.BuildServer.Test
|
||||
private readonly IDisposable _unsubErr;
|
||||
protected Wabbajack.Lib.Http.Client _authedClient;
|
||||
protected WorkQueue _queue;
|
||||
private Random _random;
|
||||
protected Random Random;
|
||||
|
||||
|
||||
public ABuildServerSystemTest(ITestOutputHelper output, SingletonAdaptor<BuildServerFixture> fixture) : base(output)
|
||||
@ -165,7 +165,7 @@ namespace Wabbajack.BuildServer.Test
|
||||
AuthorAPI.ApiKeyOverride = Fixture.APIKey;
|
||||
_queue = new WorkQueue();
|
||||
Queue = new WorkQueue();
|
||||
_random = new Random();
|
||||
Random = new Random();
|
||||
|
||||
Consts.ModlistSummaryURL = MakeURL("lists/status.json");
|
||||
Consts.ServerWhitelistURL = MakeURL("ServerWhitelist.yaml");
|
||||
@ -184,8 +184,8 @@ namespace Wabbajack.BuildServer.Test
|
||||
|
||||
protected byte[] RandomData(long? size = null)
|
||||
{
|
||||
var arr = new byte[size ?? _random.Next(1024)];
|
||||
_random.NextBytes(arr);
|
||||
var arr = new byte[size ?? Random.Next(1024)];
|
||||
Random.NextBytes(arr);
|
||||
return arr;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Wabbajack.Common;
|
||||
using Wabbajack.Lib;
|
||||
using Wabbajack.Lib.Downloaders;
|
||||
using Wabbajack.Server.DataLayer;
|
||||
@ -39,6 +40,30 @@ namespace Wabbajack.BuildServer.Test
|
||||
Assert.Contains(state.PrimaryKeyString, allStates.Select(s => s.PrimaryKeyString));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DontReenqueueDownloadedfiles()
|
||||
{
|
||||
Game.Witcher3.MetaData().GameLocation();
|
||||
var hash = Hash.FromLong(Random.Next(int.MinValue, int.MaxValue));
|
||||
await ClearDownloaderQueue();
|
||||
var _sql = Fixture.GetService<SqlService>();
|
||||
var archive = new Archive(new HTTPDownloader.State("http://www.google.com")) {Size = 42, Hash = hash,};
|
||||
await _sql.EnqueueDownload(archive);
|
||||
|
||||
var download = await _sql.GetNextPendingDownload();
|
||||
await download.Finish(_sql);
|
||||
Assert.Null(await _sql.GetNextPendingDownload());
|
||||
|
||||
var found = await _sql.GetArchiveDownload(archive.State.PrimaryKeyString, archive.Hash, archive.Size);
|
||||
Assert.NotNull(found);
|
||||
|
||||
var next = await _sql.GetOrEnqueueArchive(archive);
|
||||
Assert.Null(await _sql.GetNextPendingDownload());
|
||||
|
||||
await ClearDownloaderQueue();
|
||||
|
||||
}
|
||||
|
||||
private async Task ClearDownloaderQueue()
|
||||
{
|
||||
var service = Fixture.GetService<SqlService>();
|
||||
|
Loading…
Reference in New Issue
Block a user