test(secrets): fix Windows failures - skippable permission tests, release SQLite pools before delete (scadaproj#27)
The two Unix-permission tests called Skip.IfNot from a plain [Fact] (xunit v2 + Xunit.SkippableFact) so they failed on Windows; now [SkippableFact]. Resolver_Works_EndToEnd_ThroughDi calls SqliteConnection.ClearAllPools() before deleting its temp DB. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
+2
@@ -116,6 +116,8 @@ public sealed class AddZbSecretsTests
|
||||
finally
|
||||
{
|
||||
Environment.SetEnvironmentVariable(envVar, null);
|
||||
// Pooled SQLite handles keep the file open (Windows cannot delete it) - release them first.
|
||||
Microsoft.Data.Sqlite.SqliteConnection.ClearAllPools();
|
||||
File.Delete(dbPath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user