Merge branch 'main' of https://git.stella-ops.org/stella-ops.org/git.stella-ops.org
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -310,6 +310,7 @@ public class UnknownsDecayServiceTests
|
||||
}
|
||||
|
||||
using var cts = new CancellationTokenSource();
|
||||
using StellaOps.TestKit;
|
||||
cts.Cancel();
|
||||
|
||||
await Assert.ThrowsAsync<OperationCanceledException>(() =>
|
||||
|
||||
Reference in New Issue
Block a user