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

@@ -6,6 +6,8 @@ using StellaOps.Concelier.Core.Diagnostics;
using StellaOps.Concelier.Core.Linksets;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Concelier.WebService.Tests;
public sealed class VulnExplorerTelemetryTests : IDisposable
@@ -46,7 +48,8 @@ public sealed class VulnExplorerTelemetryTests : IDisposable
_listener.Start();
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void CountAliasCollisions_FiltersAliasConflicts()
{
var conflicts = new List<AdvisoryLinksetConflict>
@@ -61,14 +64,16 @@ public sealed class VulnExplorerTelemetryTests : IDisposable
Assert.Equal(2, count);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void IsWithdrawn_DetectsWithdrawnFlagsAndTimestamps()
{
using var json = JsonDocument.Parse("{\"withdrawn\":true,\"withdrawn_at\":\"2024-10-10T00:00:00Z\"}");
Assert.True(VulnExplorerTelemetry.IsWithdrawn(json.RootElement));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void RecordChunkLatency_EmitsHistogramMeasurement()
{
VulnExplorerTelemetry.RecordChunkLatency("tenant-a", "vendor-a", TimeSpan.FromMilliseconds(42));
@@ -78,7 +83,8 @@ public sealed class VulnExplorerTelemetryTests : IDisposable
Assert.Equal(42, measurement.Value);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void RecordWithdrawnStatement_EmitsCounter()
{
VulnExplorerTelemetry.RecordWithdrawnStatement("tenant-b", "vendor-b");