Skip to content

Commit ba62695

Browse files
committed
Fix test failure on Windows with no existing local SQL Server.
1 parent 81716cf commit ba62695

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

PSql.Tests/Integration/InvokeSqlCommandIntegrationTests.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void Invoke_Default()
3232
"""
3333
);
3434

35-
if (OperatingSystem.IsWindows())
35+
if (TestSqlServer.Credential is null)
3636
{
3737
exception.ShouldBeNull();
3838

@@ -41,13 +41,13 @@ public void Invoke_Default()
4141
}
4242
else
4343
{
44-
// Integrated authentication on non-Windows systems uses Kerberos,
45-
// which looks nontrivial to configure. Instead, jsut check for
46-
// the expected error: "Cannot authenticate using Kerberos"
47-
4844
exception .ShouldNotBeNull();
4945
exception.GetType().FullName.ShouldBe("Microsoft.Data.SqlClient.SqlException");
50-
exception.Message .ShouldContain("Cannot authenticate using Kerberos.");
46+
47+
exception.Message.ShouldMatch(
48+
// Windows Non-Windows
49+
@"^(Login failed for user |Cannot authenticate using Kerberos\.)"
50+
);
5151
}
5252
}
5353

0 commit comments

Comments
 (0)