From 387404c6eac996d612647f4d4ddf959088e1defc Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 07:27:31 +0200 Subject: [PATCH] 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 --- tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs b/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs index 5b9cdacf2..099c3a259 100644 --- a/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs +++ b/tests/Aetheria.Shared.Tests/AetheriaStoresTests.cs @@ -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(() => AetheriaStores.Open(empty)); Assert.Contains("aetheria.tests.catalogglobal", error.Message); using (AetheriaStores.Open(Catalog)) { }