test: make prerequisite lanes fail honestly

This commit is contained in:
Erik 2026-08-18 12:09:41 +02:00
parent dfc841b779
commit 6faeb4a103
113 changed files with 424 additions and 336 deletions

View file

@ -14,7 +14,7 @@ public sealed class LauncherProcessSupervisorTests
{
if (!OperatingSystem.IsWindows())
{
return;
throw new PlatformNotSupportedException("Lane=Windows requires a Windows host.");
}
var factory = new SystemChildProcessFactory();
@ -162,7 +162,7 @@ public sealed class LauncherProcessSupervisorTests
// exit code, so ExitCode == 0 is a hermetic proof the graceful
// path is what actually stopped the child.
if (!OperatingSystem.IsLinux())
return;
throw new PlatformNotSupportedException("Lane=Linux requires a native Linux host.");
string readyMarker = Path.Combine(
Path.GetTempPath(), "acdream-la3-sigint-" + Guid.NewGuid().ToString("N"));
@ -228,7 +228,7 @@ public sealed class LauncherProcessSupervisorTests
{
if (!OperatingSystem.IsWindows())
{
return;
throw new PlatformNotSupportedException("Lane=Windows requires a Windows host.");
}
string root = Path.Combine(
@ -324,7 +324,7 @@ public sealed class LauncherProcessSupervisorTests
{
if (!OperatingSystem.IsWindows())
{
return;
throw new PlatformNotSupportedException("Lane=Windows requires a Windows host.");
}
string root = Path.Combine(
@ -671,7 +671,7 @@ public sealed class LauncherProcessSupervisorTests
// on a background thread. This proves that path end to end too.
if (!OperatingSystem.IsWindows())
{
return;
throw new PlatformNotSupportedException("Lane=Windows requires a Windows host.");
}
string root = Path.Combine(

View file

@ -83,7 +83,7 @@ public sealed class LauncherExecutableSetTests : IDisposable
{
if (!OperatingSystem.IsLinux())
{
return;
throw new PlatformNotSupportedException("Lane=Linux requires a native Linux host.");
}
Directory.CreateDirectory(_root);
@ -124,7 +124,7 @@ public sealed class LauncherExecutableSetTests : IDisposable
{
if (!OperatingSystem.IsWindows())
{
return;
throw new PlatformNotSupportedException("Lane=Windows requires a Windows host.");
}
var set = new LauncherExecutableSet(

View file

@ -133,7 +133,7 @@ public sealed class LauncherProfileHardeningTests : IDisposable
{
if (!OperatingSystem.IsLinux())
{
return;
throw new PlatformNotSupportedException("Lane=Linux requires a native Linux host.");
}
File.WriteAllText(_filePath, """{"version":1,"servers":[]}""");

View file

@ -326,7 +326,7 @@ public sealed class LauncherProfileStoreTests : IDisposable
// OperatingSystem.IsLinux() early-return pattern (e.g.
// HeadlessCredentialResolverTests.LinuxRejectsGroupOrOtherCredentialPermissions).
if (!OperatingSystem.IsLinux())
return;
throw new PlatformNotSupportedException("Lane=Linux requires a native Linux host.");
var store = new LauncherProfileStore(_filePath);
store.Load();
@ -370,7 +370,7 @@ public sealed class LauncherProfileStoreTests : IDisposable
// serialization or post-create chmod can occur. This replaces the
// old timing-only poller, which could miss the vulnerable window.
if (!OperatingSystem.IsLinux())
return;
throw new PlatformNotSupportedException("Lane=Linux requires a native Linux host.");
string tempPath = _filePath + ".tmp";
using FileStream stream = LauncherProfileStore.CreateCredentialTempFile(tempPath);

View file

@ -171,7 +171,7 @@ public sealed class StatusFileTailerTests : IDisposable
// reproducible there — the fix itself is platform-agnostic, only
// this particular deterministic trigger is Windows-only.)
if (!OperatingSystem.IsWindows())
return;
throw new PlatformNotSupportedException("Lane=Windows requires a Windows host.");
AppendShared(Line("started", "s1"));
using var exclusiveHandle = new FileStream(

View file

@ -183,7 +183,7 @@ public sealed class ClientVersionStoreTests : IDisposable
{
if (!OperatingSystem.IsLinux())
{
return;
throw new PlatformNotSupportedException("Lane=Linux requires a native Linux host.");
}
var store = new ClientVersionStore(_paths);