diff --git a/ZB.MOM.WW.Secrets/tests/ZB.MOM.WW.Secrets.Tests/Configuration/SecretsStorePathRulesTests.cs b/ZB.MOM.WW.Secrets/tests/ZB.MOM.WW.Secrets.Tests/Configuration/SecretsStorePathRulesTests.cs index f203ad4..2a846c6 100644 --- a/ZB.MOM.WW.Secrets/tests/ZB.MOM.WW.Secrets.Tests/Configuration/SecretsStorePathRulesTests.cs +++ b/ZB.MOM.WW.Secrets/tests/ZB.MOM.WW.Secrets.Tests/Configuration/SecretsStorePathRulesTests.cs @@ -291,7 +291,7 @@ public sealed class SecretsStorePathRulesTests } [Fact] - public void Without_a_content_root_the_pre_host_container_still_cannot_be_told_it_is_fine() + public async Task Without_a_content_root_the_pre_host_container_still_cannot_be_told_it_is_fine() { // Positive control for the test above: the SAME path, with the content root NOT supplied, // is the pre-0.6.1 behaviour — the rule is skipped and nothing objects. This is what makes @@ -315,7 +315,15 @@ public sealed class SecretsStorePathRulesTests // Absolute, so the rooted rule passes; the content-root rule cannot fire. Documented, // and the reason pre-host composition must pass the content root explicitly. - Assert.NotNull(provider.GetRequiredService()); + await provider.GetRequiredService().MigrateAsync(default); + + // Assert the database IS created here, not merely that nothing threw. This is what + // keeps the REJECTING test honest: "no file was created" is indistinguishable from + // "nothing in this container ever creates files" unless something proves the write + // path is live. An Assert.NotNull on a resolved factory proves neither — and if the + // pre-host container ever stopped touching the store, it would silently void the + // rejecting test while continuing to pass itself. + Assert.True(File.Exists(dbPath), "the accepted path must actually get a store file"); } finally {