This commit is contained in:
StellaOps Bot
2025-12-26 21:43:56 +02:00
354 changed files with 354 additions and 0 deletions

View File

@@ -275,6 +275,7 @@ public class AttestingRichGraphWriterTests : IAsyncLifetime
public async ValueTask<byte[]> ComputeHashAsync(Stream stream, string? algorithmId = null, CancellationToken cancellationToken = default)
{
using var buffer = new MemoryStream();
using StellaOps.TestKit;
await stream.CopyToAsync(buffer, cancellationToken).ConfigureAwait(false);
return System.Security.Cryptography.SHA256.HashData(buffer.ToArray());
}

View File

@@ -383,6 +383,7 @@ public class BinaryReachabilityLifterTests
using var ms = new MemoryStream();
using var writer = new BinaryWriter(ms);
using StellaOps.TestKit;
var stringTable = new StringBuilder();
stringTable.Append('\0');
var stringOffsets = new Dictionary<string, int>(StringComparer.Ordinal);

View File

@@ -17,6 +17,7 @@ public class ReachabilityUnionPublisherTests
Edges: new ReachabilityUnionEdge[0]);
using var temp = new TempDir();
using StellaOps.TestKit;
var cas = new FakeFileContentAddressableStore();
var publisher = new ReachabilityUnionPublisher(new ReachabilityUnionWriter());

View File

@@ -180,6 +180,7 @@ public class ReachabilityUnionWriterTests
var writer = new ReachabilityUnionWriter();
using var temp = new TempDir();
using StellaOps.TestKit;
var graph = new ReachabilityUnionGraph(
Nodes: new[]
{

View File

@@ -49,6 +49,7 @@ public class RichGraphPublisherTests
var payloadBytes = Base64UrlDecode(payloadBase64Url!);
using var payloadDoc = JsonDocument.Parse(payloadBytes);
using StellaOps.TestKit;
Assert.Equal(
result.GraphHash,
payloadDoc.RootElement.GetProperty("hashes").GetProperty("graphHash").GetString());

View File

@@ -122,6 +122,7 @@ public class RichGraphWriterTests
var writer = new RichGraphWriter(CryptoHashFactory.CreateDefault());
using var temp = new TempDir();
using StellaOps.TestKit;
var union = new ReachabilityUnionGraph(
Nodes: new[]
{