Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -10,11 +10,13 @@ using StellaOps.Zastava.Observer.Posture;
using StellaOps.Zastava.Observer.Worker;
using StellaOps.Zastava.Observer.Cri;
using StellaOps.TestKit;
namespace StellaOps.Zastava.Observer.Tests;
public sealed class ContainerRuntimePollerTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task PollAsync_ProducesStartEvents_InStableOrder()
{
var timeProvider = new FakeTimeProvider(new DateTimeOffset(2025, 10, 24, 12, 0, 0, TimeSpan.Zero));
@@ -77,7 +79,8 @@ public sealed class ContainerRuntimePollerTests
Assert.All(secondPass, evt => Assert.Equal(RuntimeEventKind.ContainerStop, evt.Event.Kind));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task PollAsync_EmitsStopEvent_WhenContainerMissing()
{
var timeProvider = new FakeTimeProvider(new DateTimeOffset(2025, 10, 24, 12, 0, 0, TimeSpan.Zero));
@@ -125,7 +128,8 @@ public sealed class ContainerRuntimePollerTests
Assert.Equal(finished.FinishedAt, stop.Event.When);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task PollAsync_IncludesPostureInformation()
{
var timeProvider = new FakeTimeProvider(new DateTimeOffset(2025, 10, 24, 12, 0, 0, TimeSpan.Zero));
@@ -171,7 +175,8 @@ public sealed class ContainerRuntimePollerTests
Assert.Contains(runtimeEvent.Evidence, e => e.Signal.StartsWith("runtime.posture", StringComparison.Ordinal));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void BackoffCalculator_ComputesDelayWithinBounds()
{
var options = new ObserverBackoffOptions

View File

@@ -9,6 +9,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../../StellaOps.Zastava.Observer/StellaOps.Zastava.Observer.csproj" />
<ProjectReference Include="../../../__Libraries/StellaOps.TestKit/StellaOps.TestKit.csproj" />
</ItemGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />