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 f10d83c444
1385 changed files with 69732 additions and 10280 deletions

View File

@@ -9,7 +9,8 @@ namespace StellaOps.Graph.Api.Tests;
public class QueryServiceTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task QueryAsync_EmitsNodesEdgesStatsAndCursor()
{
var repo = new InMemoryGraphRepository();
@@ -36,7 +37,8 @@ public class QueryServiceTests
Assert.Contains(lines, l => l.Contains("\"type\":\"cursor\""));
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task QueryAsync_ReturnsBudgetExceededError()
{
var repo = new InMemoryGraphRepository();
@@ -60,7 +62,8 @@ public class QueryServiceTests
Assert.Contains("GRAPH_BUDGET_EXCEEDED", lines[0]);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task QueryAsync_IncludesOverlaysAndSamplesExplainOnce()
{
var repo = new InMemoryGraphRepository(new[]
@@ -87,6 +90,7 @@ public class QueryServiceTests
{
if (!line.Contains("\"type\":\"node\"")) continue;
using var doc = JsonDocument.Parse(line);
using StellaOps.TestKit;
var data = doc.RootElement.GetProperty("data");
if (data.TryGetProperty("overlays", out var overlaysElement) && overlaysElement.ValueKind == JsonValueKind.Object)
{