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

@@ -136,6 +136,7 @@ public class CallgraphIngestionServiceTests
if (request.ManifestContent is not null)
{
using var manifestMs = new MemoryStream();
using StellaOps.TestKit;
request.ManifestContent.CopyTo(manifestMs);
manifests[request.Hash] = manifestMs.ToArray();
}

View File

@@ -244,6 +244,7 @@ public class EdgeBundleIngestionServiceTests
using var stream1 = new MemoryStream(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(bundle1)));
using var stream2 = new MemoryStream(Encoding.UTF8.GetBytes(JsonSerializer.Serialize(bundle2)));
using StellaOps.TestKit;
// Act
await _service.IngestAsync(TestTenantId, stream1, null);
await _service.IngestAsync(TestTenantId, stream2, null);

View File

@@ -88,6 +88,7 @@ public class ReachabilityUnionIngestionServiceTests
private static string ComputeSha(string content)
{
using var sha = System.Security.Cryptography.SHA256.Create();
using StellaOps.TestKit;
var bytes = System.Text.Encoding.UTF8.GetBytes(content);
return Convert.ToHexString(sha.ComputeHash(bytes)).ToLowerInvariant();
}

View File

@@ -48,6 +48,7 @@ public class RouterEventsPublisherTests
var options = CreateOptions();
var handler = new StubHandler(HttpStatusCode.InternalServerError, "boom");
using var httpClient = new HttpClient(handler) { BaseAddress = new Uri(options.Events.Router.BaseUrl) };
using StellaOps.TestKit;
var logger = new ListLogger<RouterEventsPublisher>();
var builder = new ReachabilityFactEventBuilder(options, TimeProvider.System);
var publisher = new RouterEventsPublisher(builder, options, httpClient, logger);

View File

@@ -252,6 +252,7 @@ public class RuntimeFactsBatchIngestionTests
public async Task<StoredRuntimeFactsArtifact> SaveAsync(RuntimeFactsArtifactSaveRequest request, Stream content, CancellationToken cancellationToken)
{
using var ms = new MemoryStream();
using StellaOps.TestKit;
await content.CopyToAsync(ms, cancellationToken);
var artifact = new StoredRuntimeFactsArtifact(

View File

@@ -48,6 +48,7 @@ public sealed class SimpleJsonCallgraphParserGateTests
var parser = new SimpleJsonCallgraphParser("csharp");
await using var stream = new MemoryStream(Encoding.UTF8.GetBytes(json), writable: false);
using StellaOps.TestKit;
var parsed = await parser.ParseAsync(stream, CancellationToken.None);
parsed.Edges.Should().ContainSingle();

View File

@@ -310,6 +310,7 @@ public class UnknownsDecayServiceTests
}
using var cts = new CancellationTokenSource();
using StellaOps.TestKit;
cts.Cancel();
await Assert.ThrowsAsync<OperationCanceledException>(() =>