Networking test: the outside-the-shard fixture is written to the cache, since the database refuses it
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9f6b2d4081
commit
e0075217b7
1 changed files with 3 additions and 3 deletions
|
|
@ -4212,13 +4212,13 @@ namespace GameCult.Networking.Tests
|
|||
Schema = "tests.networking_note.v1",
|
||||
Text = "two"
|
||||
});
|
||||
// Outside the shard's key prefix: must reach the non-shard snapshot but never the
|
||||
// Outside the shard's key prefix (written to the cache directly: the database refuses a write no shard owns): must reach the non-shard snapshot but never the
|
||||
// shard-scoped one, so an unfiltered request still proves shard membership is enforced.
|
||||
await database.PutAsync(new CultRecordKey("other-note:outside-shard"), new NetworkSchemaNote
|
||||
await cache.UpsertAsync(new NetworkSchemaNote
|
||||
{
|
||||
Schema = "tests.networking_note.v1",
|
||||
Text = "outside"
|
||||
});
|
||||
}, new CultRecordHandle<NetworkSchemaNote>(new CultRecordKey("other-note:outside-shard")));
|
||||
|
||||
var nonShard = registry.CreateRawSnapshotResponse(cache, "snapshot-nonshard-unfiltered", filter: null);
|
||||
var shardScoped = database.CreateShardSnapshotResponse(shard, "snapshot-shard-unfiltered", filter: null);
|
||||
|
|
|
|||
Loading…
Reference in a new issue