Some checks are pending
CI / Build og unit tests (push) Waiting to run
CI / Integration (mcr.microsoft.com/mssql/server:2017-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2019-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2022-latest) (push) Blocked by required conditions
CI / Integration (mcr.microsoft.com/mssql/server:2025-latest) (push) Blocked by required conditions
- .NET 10 solution with Core, Connectivity, Rules, Contracts, Agent, Web and Hub - Capability model gating collectors and rules by SQL Server version (2000 and later); rules that cannot run are reported as not measurable, never as passed - Connectivity via Microsoft.Data.SqlClient with ODBC fallback for legacy instances, hardened monitoring session settings valid back to SQL Server 2000 - Support lifecycle rule (SQLI-VER-001) with lifecycle data shipped as a rule pack - Version-aware least-privilege permissions script, verified by integration tests against SQL Server in Docker (reads monitoring sources, cannot read customer data) - Forgejo Actions CI, contributing guide, code of conduct, issue templates, legacy version notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3EExwndy8Z22EK2Qpt6BK
32 lines
1.2 KiB
C#
32 lines
1.2 KiB
C#
using System.Security.Authentication;
|
|
|
|
namespace SQLInsight.Connectivity.Tests;
|
|
|
|
public class LegacyFailureClassifierTests
|
|
{
|
|
[Fact]
|
|
public void Tls_authentication_failure_is_legacy()
|
|
{
|
|
var ex = new InvalidOperationException("outer", new AuthenticationException("handshake failed"));
|
|
|
|
Assert.True(LegacyFailureClassifier.IsLegacyIncompatibility(ex));
|
|
}
|
|
|
|
[Fact]
|
|
public void Pre_login_handshake_message_is_legacy()
|
|
{
|
|
var ex = new InvalidOperationException(
|
|
"A connection was successfully established with the server, but then an error occurred during the pre-login handshake.");
|
|
|
|
Assert.True(LegacyFailureClassifier.IsLegacyIncompatibility(ex));
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("Login failed for user 'x'.")]
|
|
[InlineData("A network-related or instance-specific error occurred while establishing a connection to SQL Server.")]
|
|
[InlineData("Cannot open database \"master\" requested by the login.")]
|
|
public void Login_and_network_failures_are_not_legacy(string message)
|
|
{
|
|
Assert.False(LegacyFailureClassifier.IsLegacyIncompatibility(new InvalidOperationException(message)));
|
|
}
|
|
}
|