From 94c43e26b260e66203f2a50962376a0a5de00f05 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 6 Aug 2025 10:44:36 +1000 Subject: [PATCH 1/7] run end-to-end tests on Windows --- build/Build.Windows.ps1 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/Build.Windows.ps1 b/build/Build.Windows.ps1 index d3e803c..ed7ea80 100644 --- a/build/Build.Windows.ps1 +++ b/build/Build.Windows.ps1 @@ -29,6 +29,16 @@ function Execute-Tests($version) { & dotnet test ./test/SeqCli.Tests/SeqCli.Tests.csproj -c Release --framework "$framework" /p:Configuration=Release /p:Platform=x64 /p:VersionPrefix=$version if($LASTEXITCODE -ne 0) { throw "Build failed" } + + cd ./test/SeqCli.EndToEnd/ + docker pull datalust/seq:latest + & dotnet run -f $framework -- --docker-server + if ($LASTEXITCODE -ne 0) + { + cd ../.. + exit 1 + } + cd ../.. } function Create-ArtifactDir From d88dbe9a6a27f085b02757fd0e1f4ed212daeaff Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 6 Aug 2025 12:24:18 +1000 Subject: [PATCH 2/7] try the MSI instead of Docker --- build/Build.Windows.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/Build.Windows.ps1 b/build/Build.Windows.ps1 index ed7ea80..94aadba 100644 --- a/build/Build.Windows.ps1 +++ b/build/Build.Windows.ps1 @@ -29,10 +29,11 @@ function Execute-Tests($version) { & dotnet test ./test/SeqCli.Tests/SeqCli.Tests.csproj -c Release --framework "$framework" /p:Configuration=Release /p:Platform=x64 /p:VersionPrefix=$version if($LASTEXITCODE -ne 0) { throw "Build failed" } - + + choco install seq + cd ./test/SeqCli.EndToEnd/ - docker pull datalust/seq:latest - & dotnet run -f $framework -- --docker-server + & dotnet run -f $framework if ($LASTEXITCODE -ne 0) { cd ../.. From ad67c4d8b53fbb0d0eb21ff6f53b58b8963ec1b1 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 6 Aug 2025 12:33:44 +1000 Subject: [PATCH 3/7] find seq before the builtin --- build/Build.Windows.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Build.Windows.ps1 b/build/Build.Windows.ps1 index 94aadba..d18263e 100644 --- a/build/Build.Windows.ps1 +++ b/build/Build.Windows.ps1 @@ -31,6 +31,7 @@ function Execute-Tests($version) if($LASTEXITCODE -ne 0) { throw "Build failed" } choco install seq + $env:PATH="C:\Program Files\Seq;$env:PATH" cd ./test/SeqCli.EndToEnd/ & dotnet run -f $framework From c7b99559cd3a3958c964df4242ee0ad3c17a5c12 Mon Sep 17 00:00:00 2001 From: Ashley Mannix Date: Wed, 6 Aug 2025 13:06:03 +1000 Subject: [PATCH 4/7] pass no auth variable through on Windows --- src/SeqCli/Forwarder/Util/CaptiveProcess.cs | 12 +++++++++++- test/SeqCli.EndToEnd/Support/TestConfiguration.cs | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/SeqCli/Forwarder/Util/CaptiveProcess.cs b/src/SeqCli/Forwarder/Util/CaptiveProcess.cs index 0c2e3e4..be40279 100644 --- a/src/SeqCli/Forwarder/Util/CaptiveProcess.cs +++ b/src/SeqCli/Forwarder/Util/CaptiveProcess.cs @@ -14,6 +14,7 @@ using System; using System.Diagnostics; +using System.Collections.Generic; using System.Threading; namespace SeqCli.Forwarder.Util; @@ -25,7 +26,8 @@ public static int Run( string? args = null, Action? writeStdout = null, Action? writeStderr = null, - string? workingDirectory = null) + string? workingDirectory = null, + Dictionary? environment = null) { if (fullExePath == null) throw new ArgumentNullException(nameof(fullExePath)); @@ -48,6 +50,14 @@ public static int Run( if (!string.IsNullOrEmpty(workingDirectory)) startInfo.WorkingDirectory = workingDirectory; + if (environment != null) + { + foreach (var (k, v) in environment) + { + startInfo.EnvironmentVariables.Add(k, v); + } + } + using var process = Process.Start(startInfo)!; using var outputComplete = new ManualResetEvent(false); using var errorComplete = new ManualResetEvent(false); diff --git a/test/SeqCli.EndToEnd/Support/TestConfiguration.cs b/test/SeqCli.EndToEnd/Support/TestConfiguration.cs index ddb3756..e3b35aa 100644 --- a/test/SeqCli.EndToEnd/Support/TestConfiguration.cs +++ b/test/SeqCli.EndToEnd/Support/TestConfiguration.cs @@ -53,6 +53,9 @@ public CaptiveProcess SpawnServerProcess(string storagePath) return new CaptiveProcess(containerRuntime, $"run --name {containerName} -d -e ACCEPT_EULA=Y -e SEQ_FIRSTRUN_NOAUTHENTICATION=True -p {_serverListenPort}:80 datalust/seq:{imageTag}", stopCommandFullExePath: containerRuntime, stopCommandArgs: $"rm -f {containerName}"); } - return new CaptiveProcess("seq", commandWithArgs); + return new CaptiveProcess("seq", commandWithArgs, environment: new Dictionary + { + { "SEQ_FIRSTRUN_NOAUTHENTICATION", "True" } + }); } } From 26ba7414ee047a331e1263aa55a9b877e9b55ac2 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Mon, 11 Aug 2025 14:23:43 +1000 Subject: [PATCH 5/7] Update to Seq.Api 2025.2.1 --- src/SeqCli/SeqCli.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SeqCli/SeqCli.csproj b/src/SeqCli/SeqCli.csproj index b6caa5e..d11d533 100644 --- a/src/SeqCli/SeqCli.csproj +++ b/src/SeqCli/SeqCli.csproj @@ -32,7 +32,7 @@ - + From 626c00218a41b3e94d3c50dd65e7fa2ca2bf03b1 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Mon, 11 Aug 2025 15:19:56 +1000 Subject: [PATCH 6/7] Update to Seq.Api 2025.2.2-dev --- src/SeqCli/SeqCli.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SeqCli/SeqCli.csproj b/src/SeqCli/SeqCli.csproj index d11d533..7a055e8 100644 --- a/src/SeqCli/SeqCli.csproj +++ b/src/SeqCli/SeqCli.csproj @@ -32,7 +32,7 @@ - + From 9abebd1131f8201b07e98e12149f4e4829d2c921 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Mon, 11 Aug 2025 15:34:42 +1000 Subject: [PATCH 7/7] Update to Seq.Api 2025.2.2 --- src/SeqCli/SeqCli.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SeqCli/SeqCli.csproj b/src/SeqCli/SeqCli.csproj index 7a055e8..2c376c7 100644 --- a/src/SeqCli/SeqCli.csproj +++ b/src/SeqCli/SeqCli.csproj @@ -32,7 +32,7 @@ - +