AetheriaStoresTests: MissingCatalogGlobalIsLoud opens an existing empty catalog
The test relied on a read-only open of a nonexistent file yielding an empty catalog, which AetheriaStores.Open now refuses; the fixture writes the empty catalog first. Builds; the suite is green with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e5a57dab9f
commit
387404c6ea
1 changed files with 3 additions and 1 deletions
|
|
@ -116,7 +116,9 @@ public sealed class AetheriaStoresTests : IDisposable
|
|||
public void MissingCatalogGlobalIsLoud()
|
||||
{
|
||||
var empty = Path.Combine(_root, "empty.cc");
|
||||
using (AetheriaStores.Open(empty, catalogWritable: true)) { }
|
||||
// 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));
|
||||
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