Reviewer of Bundle C (#23 M1) flagged two blockers in the AddAuditLogTableMigration integration tests: 1. Tests used 'if (!await EnsureMigrationApplied()) return;' which made the xunit runner report them as Passed when the dev MSSQL container was absent — a CI false-positive risk. xunit 2.9.x does NOT ship the v3 Assert.Skip/SkipUnless/SkipWhen API surface (verified empirically against xunit.assert 2.9.3 — only v3.x exposes those static methods), so the canonical xunit-v2 equivalent is the Xunit.SkippableFact package. Replaced [Fact] with [SkippableFact] and the early-return pattern with 'Skip.IfNot(_fixture.Available, _fixture.SkipReason)' as the first statement of each of the 8 audit-log test methods. The runner now reports them as Skipped (not Passed) when MSSQL is down. 2. MsSqlMigrationFixture relied on SqlClient's 30s default connect timeout, so a no-container fixture construction hung ~30s. Added 'Connect Timeout=3' to DefaultAdminConnectionString. Verified fail-fast under ~4s end-to-end with a bad host via env-var override. Additional fixture cleanups: - Migration is now applied once in the fixture constructor (was per-test via EnsureMigrationApplied for idempotency). Tests reach a fully- migrated database with no extra setup. Removed the now-unused EnsureMigrationApplied helper from the test class. - Constructor narrowed its catch to SqlException + InvalidOperationException for the OpenAsync step (the only legitimate connect-failure surfaces); everything else (CREATE DATABASE, MigrateAsync) is treated as a hard fixture failure and bubbles up. Added a best-effort TryDropOrphanDatabase() pre-throw cleanup so partial construction cannot leak guid-suffixed databases. - Stale doc comments referencing the (non-existent) xunit 2.9.x Skip shim removed; replaced with accurate notes about Xunit.SkippableFact. Verified: - dotnet build ScadaLink.slnx: clean (0 warnings, 0 errors). - dotnet test ScadaLink.ConfigurationDatabase.Tests with MSSQL up: Passed 150 / Skipped 0 / Failed 0. - Same suite with SCADALINK_MSSQL_TEST_CONN pointed at a closed port: the 8 AddAuditLogTableMigration tests report as Skipped (visible '[SKIP]' lines in runner output), total elapsed ~3s. Files touched: - Directory.Packages.props: added Xunit.SkippableFact 1.5.61. - tests/ScadaLink.ConfigurationDatabase.Tests/ScadaLink.ConfigurationDatabase.Tests.csproj: added the SkippableFact PackageReference. - tests/ScadaLink.ConfigurationDatabase.Tests/Migrations/MsSqlMigrationFixture.cs: Connect Timeout=3, constructor refactor, doc-comment fixes. - tests/ScadaLink.ConfigurationDatabase.Tests/Migrations/AddAuditLogTableMigrationTests.cs: [SkippableFact] + Skip.IfNot pattern across all 8 tests. Untouched (per reviewer guidance): - Migration file (Bundle C main artifact unchanged). - Bundle B reconciliation (composite PK + UX_AuditLog_EventId). - SqlClient VersionOverride 6.1.1 in the test csproj. - infra/* (separate uncommitted local edits remain in working tree).
78 lines
5.0 KiB
XML
78 lines
5.0 KiB
XML
<Project>
|
|
|
|
<PropertyGroup>
|
|
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageVersion Include="Akka" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Cluster" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Cluster.Hosting" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Cluster.Tools" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Hosting" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Remote" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Remote.Hosting" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Streams" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.Streams.TestKit" Version="1.5.62" />
|
|
<PackageVersion Include="Akka.TestKit.Xunit2" Version="1.5.62" />
|
|
<PackageVersion Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
|
|
<PackageVersion Include="bunit" Version="2.0.33-preview" />
|
|
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
|
|
<PackageVersion Include="FluentAssertions" Version="8.3.0" />
|
|
<PackageVersion Include="Google.Protobuf" Version="3.29.3" />
|
|
<PackageVersion Include="Grpc.AspNetCore" Version="2.71.0" />
|
|
<PackageVersion Include="Grpc.Net.Client" Version="2.71.0" />
|
|
<PackageVersion Include="Grpc.Tools" Version="2.71.0" />
|
|
<PackageVersion Include="MailKit" Version="4.16.0" />
|
|
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.3" />
|
|
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="5.0.0" />
|
|
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0" />
|
|
<PackageVersion Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
|
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.7" />
|
|
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
|
<PackageVersion Include="Microsoft.Playwright" Version="1.58.0" />
|
|
<PackageVersion Include="Moq" Version="4.20.72" />
|
|
<PackageVersion Include="Novell.Directory.Ldap.NETStandard" Version="3.6.0" />
|
|
<PackageVersion Include="NSubstitute" Version="5.3.0" />
|
|
<PackageVersion Include="OPCFoundation.NetStandard.Opc.Ua.Client" Version="1.5.378.106" />
|
|
<PackageVersion Include="OpenTelemetry.Api" Version="1.15.3" />
|
|
<PackageVersion Include="Serilog" Version="4.3.1" />
|
|
<PackageVersion Include="Serilog.AspNetCore" Version="10.0.0" />
|
|
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
|
|
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
|
|
<PackageVersion Include="System.CommandLine" Version="2.0.5" />
|
|
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.11.0" />
|
|
<PackageVersion Include="xunit" Version="2.9.3" />
|
|
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.4" />
|
|
<!--
|
|
Xunit.SkippableFact provides [SkippableFact] + Skip.IfNot/Skip.If for
|
|
xunit v2. The native Skip API (Assert.Skip / Assert.SkipUnless /
|
|
Assert.SkipWhen) only exists in xunit v3; xunit 2.9.x lacks it. Used by
|
|
Bundle C MSSQL integration tests in ScadaLink.ConfigurationDatabase.Tests
|
|
to mark tests as Skipped (not silently Passed) when MSSQL is unreachable.
|
|
-->
|
|
<PackageVersion Include="Xunit.SkippableFact" Version="1.5.61" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|