more audit work

This commit is contained in:
master
2026-01-08 10:21:51 +02:00
parent 43c02081ef
commit 51cf4bc16c
546 changed files with 36721 additions and 4003 deletions

View File

@@ -6,6 +6,7 @@
// -----------------------------------------------------------------------------
using System.Net.Http.Json;
using Xunit.Sdk;
namespace StellaOps.Chaos.Router.Tests.Fixtures;
@@ -57,10 +58,18 @@ public class RouterTestFixture : IAsyncLifetime
return JsonContent.Create(request);
}
public ValueTask InitializeAsync()
public async ValueTask InitializeAsync()
{
// Verify router is reachable
return ValueTask.CompletedTask;
try
{
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(2));
_ = await _client.GetAsync("/", cts.Token);
}
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException || ex is OperationCanceledException)
{
throw SkipException.ForSkip(
$"Router not reachable at '{_routerUrl}'. Set ROUTER_URL or start the router service to run chaos tests.");
}
}
public ValueTask DisposeAsync()