AetheriaStoresTests: MissingCatalogGlobalIsLoud copies the fixture catalog and removes its global
Flushing an empty cache writes no file, so the previous fixture still hit the new missing-file refusal. Builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
1521c68a79
commit
9ae5fbb350
1 changed files with 4 additions and 3 deletions
|
|
@ -116,9 +116,10 @@ public sealed class AetheriaStoresTests : IDisposable
|
|||
public void MissingCatalogGlobalIsLoud()
|
||||
{
|
||||
var empty = Path.Combine(_root, "empty.cc");
|
||||
// An existing catalog with no records: a read-only open refuses a missing file before it checks globals.
|
||||
using (var seed = AetheriaStores.Open(empty, catalogWritable: true)) seed.FlushAsync().Wait();
|
||||
Assert.True(File.Exists(empty));
|
||||
// A catalog file that exists but lacks the global: the read-only open reaches the global check.
|
||||
File.Copy(Catalog, empty);
|
||||
using (var seed = AetheriaStores.Open(empty, catalogWritable: true))
|
||||
Assert.True(seed.Commit(batch => batch.Remove(seed.RefOf(seed.GetGlobal<TestCatalogGlobal>()).Key)));
|
||||
var error = Assert.Throws<InvalidOperationException>(() => AetheriaStores.Open(empty));
|
||||
Assert.Contains("aetheria.tests.catalogglobal", error.Message);
|
||||
using (AetheriaStores.Open(Catalog)) { }
|
||||
|
|
|
|||
Loading…
Reference in a new issue