Open Unity state through remote CultMesh replicas

This commit is contained in:
Meta Vens 2026-07-10 03:03:13 +01:00
commit 847af3772f
6 changed files with 128 additions and 2 deletions

View file

@ -414,6 +414,31 @@ public class DaemonRuntimeDocumentTests
source.SourceId == AetheriaRuntimeVerseRecordKeys.DaemonFrameLatest.ToString()));
}
[Test]
public void AetheriaRuntimeVerseClientRemoteModeCreatesNonAuthoritativeReplicaShard()
{
var statePath = Path.Combine(
Path.GetTempPath(),
"aetheria-remote-verse-client-tests",
Path.GetRandomFileName(),
"replica.cc");
using var verse = AetheriaRuntimeVerseClient
.OpenRemoteAsync(
statePath,
"cultnet://127.0.0.1:39751",
"unity-remote-test",
synchronizeOnOpen: false)
.GetAwaiter()
.GetResult();
var shard = verse.Database.Shards.Single();
Assert.IsTrue(verse.IsRemoteReplica);
Assert.AreEqual("cultnet://127.0.0.1:39751", verse.RemoteEndpoint);
Assert.IsFalse(shard.IsPrimary);
CollectionAssert.Contains(shard.PrimaryEndpoints, verse.RemoteEndpoint);
}
[Test]
public void TickRunnerAppliesObservedCommandsAndPublishesFrame()
{