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

@@ -20,7 +20,8 @@ public sealed class PostgresProofSpineRepositoryTests
public PostgresProofSpineRepositoryTests(ScannerProofSpinePostgresFixture fixture)
=> _fixture = fixture;
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task SaveAsync_ThenGetByIdAsync_RoundTripsSpine()
{
await _fixture.TruncateAllTablesAsync();
@@ -37,6 +38,7 @@ public sealed class PostgresProofSpineRepositoryTests
};
await using var dataSource = new ScannerDataSource(Options.Create(options), NullLogger<ScannerDataSource>.Instance);
using StellaOps.TestKit;
var repository = new PostgresProofSpineRepository(
dataSource,
NullLogger<PostgresProofSpineRepository>.Instance,

View File

@@ -5,11 +5,13 @@ using StellaOps.Scanner.ProofSpine;
using StellaOps.Scanner.ProofSpine.Options;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Scanner.ProofSpine.Tests;
public sealed class ProofSpineBuilderTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task BuildAsync_SameInputs_ProducesSameIds()
{
var options = Options.Create(new ProofSpineDsseSigningOptions
@@ -62,7 +64,8 @@ public sealed class ProofSpineBuilderTests
Assert.Equal(spine1.Segments[1].SegmentId, spine2.Segments[1].SegmentId);
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task VerifyAsync_DetectsTampering()
{
var options = Options.Create(new ProofSpineDsseSigningOptions