From b878fd3ab66dff674d30c5d2e486dc9ed2051678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Eggert=20Lundsteen=20Olsen?= Date: Fri, 2 Oct 2026 16:49:05 +0200 Subject: [PATCH] Version 1.5.1: Windows-only tests pass in the Linux CI build - AxLogonClient.Command always builds a Windows path to powershell.exe - The grant-script test is skipped outside Windows (needs Windows PowerShell) - The DNS test looks up an absolute name, so a search domain can't resolve it v1.5.0 was tagged but never released because these failed in CI. Co-Authored-By: Claude Opus 5.5 (1M context) --- Directory.Build.props | 2 +- docs/opdatering.md | 10 +++++----- .../Synthetic/AxBusinessConnector.cs | 3 ++- tests/SQLInsight.Servers.Tests/GrantScriptTests.cs | 6 ++++++ .../SyntheticCheckRunnerTests.cs | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index f7a6ea1..82beafc 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -14,7 +14,7 @@ SQLInsight Pro Copyright (c) SEOSoft - 1.5.0 + 1.5.1 diff --git a/docs/opdatering.md b/docs/opdatering.md index 182ddee..30c64f4 100644 --- a/docs/opdatering.md +++ b/docs/opdatering.md @@ -158,18 +158,18 @@ Kører web i IIS, angives `"AppOffline": true` i stedet for `Service`. Så lægg dotnet run --project tools/SQLInsight.LicenseTool -- rulepack --version 2026.10.14 --out rulepack-2026.10.14.json # MSI til installationer lavet med MSI'en (bygges på Linux) -installer/build-msi.sh 1.5.0 +installer/build-msi.sh 1.5.1 # Programpakker: én zip pr. platform med mapperne Agent/ og Web/ # Samme opsætning som MSI'en (indbygget .NET), så en opdatering ikke kræver en runtime på serveren -dotnet publish src/SQLInsight.Agent -c Release -r win-x64 --self-contained true -p:Version=1.5.0 -o pkg/win-x64/Agent -dotnet publish src/SQLInsight.Web -c Release -r win-x64 --self-contained true -p:Version=1.5.0 -o pkg/win-x64/Web +dotnet publish src/SQLInsight.Agent -c Release -r win-x64 --self-contained true -p:Version=1.5.1 -o pkg/win-x64/Agent +dotnet publish src/SQLInsight.Web -c Release -r win-x64 --self-contained true -p:Version=1.5.1 -o pkg/win-x64/Web # Signér kanalens manifest (det, der ikke angives, overtages fra det eksisterende manifest) dotnet run --project tools/SQLInsight.LicenseTool -- publish --key sqlinsight-k20260929.private.pem --kid k20260929 \ --feed feed --channel stable --rulepack rulepack-2026.10.14.json \ - --release 1.5.0 --asset win-x64=sqlinsight-1.5.0-win-x64.zip --asset win-x64-msi=dist/SQLInsight-Pro-1.5.0-x64.msi \ - --asset linux-x64=sqlinsight-1.5.0-linux-x64.zip \ + --release 1.5.1 --asset win-x64=sqlinsight-1.5.1-win-x64.zip --asset win-x64-msi=dist/SQLInsight-Pro-1.5.1-x64.msi \ + --asset linux-x64=sqlinsight-1.5.1-linux-x64.zip \ --notes https://git.seosoft.dk/seo/sqlinsight-pro/releases ``` diff --git a/src/SQLInsight.Servers/Synthetic/AxBusinessConnector.cs b/src/SQLInsight.Servers/Synthetic/AxBusinessConnector.cs index 67f21cf..3dfd309 100644 --- a/src/SQLInsight.Servers/Synthetic/AxBusinessConnector.cs +++ b/src/SQLInsight.Servers/Synthetic/AxBusinessConnector.cs @@ -182,7 +182,8 @@ public static class AxLogonClient { ArgumentNullException.ThrowIfNull(installation); var folder = installation.Is32Bit && System.Environment.Is64BitOperatingSystem ? "SysWOW64" : "System32"; - var powershell = Path.Combine(windowsDirectory, folder, @"WindowsPowerShell\v1.0\powershell.exe"); + // Always a Windows path, also when the code (or a test) runs elsewhere. + var powershell = $@"{windowsDirectory.TrimEnd('\\', '/')}\{folder}\WindowsPowerShell\v1.0\powershell.exe"; var arguments = new List(); if (installation.NeedsClr2) { diff --git a/tests/SQLInsight.Servers.Tests/GrantScriptTests.cs b/tests/SQLInsight.Servers.Tests/GrantScriptTests.cs index 1bf210f..3923d26 100644 --- a/tests/SQLInsight.Servers.Tests/GrantScriptTests.cs +++ b/tests/SQLInsight.Servers.Tests/GrantScriptTests.cs @@ -50,6 +50,12 @@ public sealed class GrantScriptTests [Fact] public async Task Exactly_one_ace_is_added_and_removing_it_restores_the_original() { + if (!OperatingSystem.IsWindows()) + { + // The script runs in Windows PowerShell; the CI build runs on Linux. + return; + } + var output = await RunAsync(); Assert.Equal("D:(A;;CC;;;AU)(A;;CCLCRPRC;;;IU)(A;;CCLCRPRC;;;SU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)(A;;CC;;;AC)(A;;CCLCRPRC;;;NS)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)", output["scm-new"]); diff --git a/tests/SQLInsight.Servers.Tests/SyntheticCheckRunnerTests.cs b/tests/SQLInsight.Servers.Tests/SyntheticCheckRunnerTests.cs index 802f34c..0d90c31 100644 --- a/tests/SQLInsight.Servers.Tests/SyntheticCheckRunnerTests.cs +++ b/tests/SQLInsight.Servers.Tests/SyntheticCheckRunnerTests.cs @@ -181,7 +181,7 @@ public sealed class SyntheticCheckRunnerTests : IDisposable { var ok = await Runner().RunAsync(Run(SyntheticCheckKind.Dns, new() { Host = "localhost" }), CancellationToken.None); var wrong = await Runner().RunAsync(Run(SyntheticCheckKind.Dns, new() { Host = "localhost", ExpectedAddresses = ["10.1.2.3"] }), CancellationToken.None); - var unknown = await Runner().RunAsync(Run(SyntheticCheckKind.Dns, new() { Host = "findes-ikke.invalid" }), CancellationToken.None); + var unknown = await Runner().RunAsync(Run(SyntheticCheckKind.Dns, new() { Host = "findes-ikke.invalid." }), CancellationToken.None); Assert.True(ok.Success, ok.Message); Assert.False(wrong.Success);