Skip to content

Commit e75dfa7

Browse files
authored
Merge pull request #430 from datalust/dev
2025.2 Maintenance Release
2 parents ab81820 + e72d392 commit e75dfa7

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

build/Build.Windows.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ function Execute-Tests($version)
2929
{
3030
& dotnet test ./test/SeqCli.Tests/SeqCli.Tests.csproj -c Release --framework "$framework" /p:Configuration=Release /p:Platform=x64 /p:VersionPrefix=$version
3131
if($LASTEXITCODE -ne 0) { throw "Build failed" }
32+
33+
choco install seq
34+
$env:PATH="C:\Program Files\Seq;$env:PATH"
35+
36+
cd ./test/SeqCli.EndToEnd/
37+
& dotnet run -f $framework
38+
if ($LASTEXITCODE -ne 0)
39+
{
40+
cd ../..
41+
exit 1
42+
}
43+
cd ../..
3244
}
3345

3446
function Create-ArtifactDir

src/SeqCli/Forwarder/Util/CaptiveProcess.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System;
1616
using System.Diagnostics;
17+
using System.Collections.Generic;
1718
using System.Threading;
1819

1920
namespace SeqCli.Forwarder.Util;
@@ -25,7 +26,8 @@ public static int Run(
2526
string? args = null,
2627
Action<string>? writeStdout = null,
2728
Action<string>? writeStderr = null,
28-
string? workingDirectory = null)
29+
string? workingDirectory = null,
30+
Dictionary<string, string>? environment = null)
2931
{
3032
if (fullExePath == null) throw new ArgumentNullException(nameof(fullExePath));
3133

@@ -48,6 +50,14 @@ public static int Run(
4850
if (!string.IsNullOrEmpty(workingDirectory))
4951
startInfo.WorkingDirectory = workingDirectory;
5052

53+
if (environment != null)
54+
{
55+
foreach (var (k, v) in environment)
56+
{
57+
startInfo.EnvironmentVariables.Add(k, v);
58+
}
59+
}
60+
5161
using var process = Process.Start(startInfo)!;
5262
using var outputComplete = new ManualResetEvent(false);
5363
using var errorComplete = new ManualResetEvent(false);

src/SeqCli/SeqCli.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333
<ItemGroup>
3434
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
35-
<PackageReference Include="Seq.Api" Version="2025.2.0" />
35+
<PackageReference Include="Seq.Api" Version="2025.2.2" />
3636
<PackageReference Include="Serilog" Version="4.3.0" />
3737
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
3838
<PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />

test/SeqCli.EndToEnd/Support/TestConfiguration.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public CaptiveProcess SpawnServerProcess(string storagePath)
5353
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}");
5454
}
5555

56-
return new CaptiveProcess("seq", commandWithArgs);
56+
return new CaptiveProcess("seq", commandWithArgs, environment: new Dictionary<string, string>
57+
{
58+
{ "SEQ_FIRSTRUN_NOAUTHENTICATION", "True" }
59+
});
5760
}
5861
}

0 commit comments

Comments
 (0)