feat(render): implement Campaign AR and terrain fidelity
This commit is contained in:
parent
99cf26e00c
commit
7a5f96ede5
368 changed files with 50611 additions and 950 deletions
|
|
@ -108,6 +108,45 @@ public sealed class HeadlessPluginSessionTests
|
|||
Assert.DoesNotContain("fixture-", output.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RenderPackOnlyRequest_IsRejectedBeforeHeadlessLoadsItsDll()
|
||||
{
|
||||
using var temporary = new TemporaryDirectory();
|
||||
const string renderPackId = "acdream.test.render-only";
|
||||
string pluginDirectory = Path.Combine(temporary.Path, "render-only");
|
||||
Directory.CreateDirectory(pluginDirectory);
|
||||
File.WriteAllText(
|
||||
Path.Combine(pluginDirectory, "plugin.json"),
|
||||
JsonSerializer.Serialize(new
|
||||
{
|
||||
id = renderPackId,
|
||||
displayName = "Render only",
|
||||
version = "1.0.0",
|
||||
entryDll = "deliberately-missing.dll",
|
||||
apiVersion = 1,
|
||||
kinds = new[] { "renderPack" },
|
||||
}));
|
||||
string statusPath = Path.Combine(temporary.Path, "status.jsonl");
|
||||
var credential = new HeadlessCredentialSecret("fixture", "password");
|
||||
using var session = new HeadlessSessionHost(
|
||||
Descriptor([renderPackId], statusPath),
|
||||
credential,
|
||||
new HeadlessDiagnosticWriter(new StringWriter()),
|
||||
new FixtureSessionOperations(),
|
||||
pluginRoots: [temporary.Path]);
|
||||
|
||||
_ = session.Start();
|
||||
|
||||
Assert.Equal(0, session.Plugins.LoadedCount);
|
||||
Assert.Empty(session.Plugins.CaptureLoadContextWeakReferences());
|
||||
JsonElement failed = ReadStatuses(statusPath)
|
||||
.Single(static item =>
|
||||
item.GetProperty("e").GetString() == "pluginFailed");
|
||||
string error = failed.GetProperty("error").GetString()!;
|
||||
Assert.Contains("does not support", error);
|
||||
Assert.DoesNotContain("entry dll", error, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ThrowAfterRegistrationRollsBackEventsAndCollectsContext()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue