test(launcher): Campaign LA enforce composer-host contract
This commit is contained in:
parent
7749545dc4
commit
8a03a25fc3
6 changed files with 155 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
using AcDream.App.Configuration;
|
||||
using AcDream.Tests.Fixtures.CampaignLa;
|
||||
|
||||
namespace AcDream.App.Tests.Configuration;
|
||||
|
||||
|
|
@ -18,6 +19,43 @@ namespace AcDream.App.Tests.Configuration;
|
|||
/// </summary>
|
||||
public sealed class SessionConfigurationSharedFixtureTests
|
||||
{
|
||||
[Fact]
|
||||
public void AppReaderAcceptsLauncherCoreComposerDocument()
|
||||
{
|
||||
using TemporaryFile file = TemporaryFile.Create(
|
||||
LauncherCoreSessionConfigFixture.Compose());
|
||||
|
||||
(SessionConfiguration configuration, SessionDescriptor session) =
|
||||
SessionConfigurationLoader.Load(file.Path);
|
||||
|
||||
Assert.Equal("composer-contract", session.Id);
|
||||
Assert.Equal("composer.example", session.Endpoint.Host);
|
||||
Assert.Equal(9010, session.Endpoint.Port);
|
||||
Assert.Equal("composer-account", session.Account);
|
||||
Assert.Equal(0x50000001u, session.Character?.Id);
|
||||
Assert.Equal("idle", session.Policy?.Id);
|
||||
Assert.Equal(
|
||||
SessionCredentialProviderKind.StandardInput,
|
||||
session.Credential.Provider);
|
||||
Assert.Equal("session", session.Credential.Reference);
|
||||
Assert.Equal("composer-dats", configuration.Process?.Content?.DatDirectory);
|
||||
Assert.Equal(
|
||||
"composer-dats/acdream.pak",
|
||||
configuration.Process?.Content?.PreparedAssetPath);
|
||||
Assert.Equal(["ComposerPlugin"], session.Plugins);
|
||||
Assert.Equal(["/composer command"], session.LoginCommands);
|
||||
Assert.Equal(625, session.LoginCommandDelayMs);
|
||||
string statusFile = Assert.IsType<string>(session.StatusFile);
|
||||
Assert.EndsWith(
|
||||
Path.Combine("composer-contract", "status.jsonl"),
|
||||
statusFile,
|
||||
StringComparison.Ordinal);
|
||||
Assert.DoesNotContain(
|
||||
LauncherCoreSessionConfigFixture.Password,
|
||||
File.ReadAllText(file.Path),
|
||||
StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AppReaderAcceptsTheProductionShapedSharedFixture()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue