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

@@ -8,6 +8,7 @@ using StellaOps.Policy.Engine.Options;
using StellaOps.Policy.Engine.Services;
using StellaOps.PolicyDsl;
using StellaOps.TestKit;
namespace StellaOps.Policy.Engine.Tests;
public sealed class PolicyBundleServiceTests
@@ -18,7 +19,8 @@ public sealed class PolicyBundleServiceTests
}
""";
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CompileAndStoreAsync_SucceedsAndStoresBundle()
{
var services = CreateServices();
@@ -32,7 +34,8 @@ public sealed class PolicyBundleServiceTests
Assert.True(response.SizeBytes > 0);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CompileAndStoreAsync_FailsWithBadSyntax()
{
var services = CreateServices();
@@ -45,7 +48,8 @@ public sealed class PolicyBundleServiceTests
Assert.NotEmpty(response.Diagnostics);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CompileAndStoreAsync_ReturnsAocMetadata()
{
var services = CreateServices();
@@ -63,7 +67,8 @@ public sealed class PolicyBundleServiceTests
Assert.True(response.AocMetadata.ComplexityScore >= 0);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CompileAndStoreAsync_IncludesProvenanceWhenProvided()
{
var services = CreateServices();
@@ -95,7 +100,8 @@ public sealed class PolicyBundleServiceTests
Assert.Equal("main", bundle.AocMetadata.Provenance.Branch);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CompileAndStoreAsync_NullAocMetadataOnFailure()
{
var services = CreateServices();
@@ -107,7 +113,8 @@ public sealed class PolicyBundleServiceTests
Assert.Null(response.AocMetadata);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task CompileAndStoreAsync_SourceDigestIsDeterministic()
{
var services = CreateServices();