docs(integration): verify Godot and Linux SpaceGame pilot (#21)
This commit is contained in:
@@ -194,21 +194,37 @@ public sealed partial class DocumentationContractTests
|
||||
{
|
||||
string root = FindRepositoryRoot();
|
||||
string guide = File.ReadAllText(Path.Combine(root, "docs", "integration", "spacegame-pilot.md"));
|
||||
string deploymentGuide = File.ReadAllText(Path.Combine(root, "docs", "deployment", "linux.md"));
|
||||
using JsonDocument evidence = JsonDocument.Parse(File.ReadAllText(
|
||||
Path.Combine(root, "docs", "evidence", "consumers", "spacegame.json")));
|
||||
JsonElement record = evidence.RootElement;
|
||||
|
||||
Assert.Equal("checkpoint-pass-with-open-gates", record.GetProperty("result").GetString());
|
||||
Assert.Equal(0, record.GetProperty("localRun").GetProperty("rendezvousGameplayPayloads").GetInt32());
|
||||
Assert.Equal("checkpoint-pass-with-external-gates", record.GetProperty("result").GetString());
|
||||
Assert.Equal("none", record.GetProperty("localRun").GetProperty("rendezvousGameplayPayloadPath").GetString());
|
||||
Assert.Equal("caller-owned-litenetlib", record.GetProperty("localRun").GetProperty("gameplayTransport").GetString());
|
||||
Assert.True(record.GetProperty("localRun").GetProperty("directGameplay").GetBoolean());
|
||||
Assert.Equal(29, record.GetProperty("verification").GetProperty("debugTests").GetProperty("passed").GetInt32());
|
||||
Assert.Equal(29, record.GetProperty("verification").GetProperty("releaseTests").GetProperty("passed").GetInt32());
|
||||
Assert.True(record.GetProperty("localRun").GetProperty("reconnected").GetBoolean());
|
||||
Assert.True(record.GetProperty("linuxRun").GetProperty("freshExport").GetBoolean());
|
||||
Assert.False(record.GetProperty("linuxRun").GetProperty("sourceDirty").GetBoolean());
|
||||
Assert.Equal(31, record.GetProperty("verification").GetProperty("debugTests").GetProperty("passed").GetInt32());
|
||||
Assert.Equal(31, record.GetProperty("verification").GetProperty("releaseTests").GetProperty("passed").GetInt32());
|
||||
Assert.Contains("public-package-restore", record.GetProperty("openGates").EnumerateArray().Select(static gate => gate.GetString()));
|
||||
Assert.Contains("actual-godot-process-integration", record.GetProperty("openGates").EnumerateArray().Select(static gate => gate.GetString()));
|
||||
Assert.Contains("dedicated-fallback-connection", record.GetProperty("openGates").EnumerateArray().Select(static gate => gate.GetString()));
|
||||
Assert.Contains("representative-external-nat", record.GetProperty("openGates").EnumerateArray().Select(static gate => gate.GetString()));
|
||||
Assert.DoesNotContain("actual-godot-process-integration", record.GetProperty("openGates").EnumerateArray().Select(static gate => gate.GetString()));
|
||||
Assert.DoesNotContain("dedicated-fallback-connection", record.GetProperty("openGates").EnumerateArray().Select(static gate => gate.GetString()));
|
||||
Assert.Contains("Do not mark #21 passed", guide, StringComparison.Ordinal);
|
||||
Assert.Contains("Rendezvous reserves no gameplay", guide, StringComparison.Ordinal);
|
||||
Assert.Contains("not runtime proof", guide, StringComparison.Ordinal);
|
||||
Assert.Contains("private-network service name", guide, StringComparison.Ordinal);
|
||||
Assert.Contains("local/private-bridge smoke", deploymentGuide, StringComparison.Ordinal);
|
||||
Assert.Contains("explicit `rendezvous` host name", deploymentGuide, StringComparison.Ordinal);
|
||||
|
||||
using JsonDocument composeSettings = JsonDocument.Parse(File.ReadAllText(
|
||||
Path.Combine(root, "deploy", "compose", "appsettings.Production.json")));
|
||||
JsonElement compose = composeSettings.RootElement;
|
||||
Assert.Contains("rendezvous", compose.GetProperty("AllowedHosts").GetString()!.Split(';'));
|
||||
JsonElement game = compose.GetProperty("Rendezvous").GetProperty("Provisioning").GetProperty("Games")[0];
|
||||
Assert.Contains(2, game.GetProperty("ProtocolVersions").EnumerateArray().Select(static version => version.GetInt32()));
|
||||
Assert.Equal("DedicatedEndpointAllowed", game.GetProperty("FallbackPolicy").GetString());
|
||||
Assert.DoesNotMatch(ReusableCredential(), guide);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user