diff --git a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailInjectionTests.cs b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailInjectionTests.cs index 48ca0c97d..ce52666ff 100644 --- a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailInjectionTests.cs +++ b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailInjectionTests.cs @@ -129,6 +129,7 @@ public sealed class AdvisoryGuardrailInjectionTests } using var stream = File.OpenRead(path); +using StellaOps.TestKit; var cases = JsonSerializer.Deserialize>(stream, SerializerOptions); return cases ?? throw new InvalidOperationException("Guardrail injection harness cases could not be loaded."); } diff --git a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailOptionsBindingTests.cs b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailOptionsBindingTests.cs index 175083506..5ae109c77 100644 --- a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailOptionsBindingTests.cs +++ b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailOptionsBindingTests.cs @@ -67,6 +67,7 @@ public sealed class AdvisoryGuardrailOptionsBindingTests services.AddAdvisoryAiCore(configuration); await using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var action = () => provider.GetRequiredService>().Value; action.Should().Throw(); } diff --git a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailPerformanceTests.cs b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailPerformanceTests.cs index eedc97f72..904d2d3d0 100644 --- a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailPerformanceTests.cs +++ b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryGuardrailPerformanceTests.cs @@ -118,6 +118,7 @@ public sealed class AdvisoryGuardrailPerformanceTests var path = Path.Combine(AppContext.BaseDirectory, "TestData", "guardrail-blocked-phrases.json"); using var stream = File.OpenRead(path); using var document = JsonDocument.Parse(stream); +using StellaOps.TestKit; if (document.RootElement.TryGetProperty("phrases", out var phrasesElement) && phrasesElement.ValueKind == JsonValueKind.Array) { return phrasesElement.EnumerateArray() diff --git a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPipelineExecutorTests.cs b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPipelineExecutorTests.cs index 6c682e6b0..6ad23992c 100644 --- a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPipelineExecutorTests.cs +++ b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPipelineExecutorTests.cs @@ -178,6 +178,7 @@ public sealed class AdvisoryPipelineExecutorTests : IDisposable var guardrail = new StubGuardrailPipeline(blocked: false); var store = new InMemoryAdvisoryOutputStore(); using var metrics = new AdvisoryPipelineMetrics(_meterFactory); +using StellaOps.TestKit; var inferenceMetadata = ImmutableDictionary.Empty.Add("inference.fallback_reason", "throttle"); var inference = new StubInferenceClient { diff --git a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPromptAssemblerTests.cs b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPromptAssemblerTests.cs index 3dba9213b..d2954908c 100644 --- a/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPromptAssemblerTests.cs +++ b/src/AdvisoryAI/__Tests/StellaOps.AdvisoryAI.Tests/AdvisoryPromptAssemblerTests.cs @@ -71,6 +71,7 @@ public sealed class AdvisoryPromptAssemblerTests var prompt = await assembler.AssembleAsync(plan, CancellationToken.None); using var document = JsonDocument.Parse(prompt.Prompt); +using StellaOps.TestKit; var matches = document.RootElement .GetProperty("vectors")[0] .GetProperty("matches") diff --git a/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/HttpClientUsageAnalyzerTests.cs b/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/HttpClientUsageAnalyzerTests.cs index 00d1cc1ff..3ffd157b0 100644 --- a/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/HttpClientUsageAnalyzerTests.cs +++ b/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/HttpClientUsageAnalyzerTests.cs @@ -118,6 +118,7 @@ public sealed class HttpClientUsageAnalyzerTests { using var workspace = new AdhocWorkspace(); +using StellaOps.TestKit; var projectId = ProjectId.CreateNewId(); var documentId = DocumentId.CreateNewId(projectId); var stubDocumentId = DocumentId.CreateNewId(projectId); diff --git a/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/PolicyAnalyzerRoslynTests.cs b/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/PolicyAnalyzerRoslynTests.cs index a9b987686..6303eca13 100644 --- a/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/PolicyAnalyzerRoslynTests.cs +++ b/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Analyzers.Tests/PolicyAnalyzerRoslynTests.cs @@ -485,6 +485,7 @@ public sealed class PolicyAnalyzerRoslynTests { using var workspace = new AdhocWorkspace(); +using StellaOps.TestKit; var projectId = ProjectId.CreateNewId(); var documentId = DocumentId.CreateNewId(projectId); var stubDocumentId = DocumentId.CreateNewId(projectId); diff --git a/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Tests/EgressPolicyTests.cs b/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Tests/EgressPolicyTests.cs index e0654c876..2da08be10 100644 --- a/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Tests/EgressPolicyTests.cs +++ b/src/AirGap/StellaOps.AirGap.Policy/StellaOps.AirGap.Policy.Tests/EgressPolicyTests.cs @@ -202,6 +202,7 @@ public sealed class EgressPolicyTests using var client = EgressHttpClientFactory.Create(recordingPolicy, request); +using StellaOps.TestKit; Assert.True(recordingPolicy.EnsureAllowedCalled); Assert.NotNull(client); } diff --git a/src/AirGap/__Libraries/__Tests/StellaOps.AirGap.Bundle.Tests/BundleImportTests.cs b/src/AirGap/__Libraries/__Tests/StellaOps.AirGap.Bundle.Tests/BundleImportTests.cs index 9b9450113..c028e44db 100644 --- a/src/AirGap/__Libraries/__Tests/StellaOps.AirGap.Bundle.Tests/BundleImportTests.cs +++ b/src/AirGap/__Libraries/__Tests/StellaOps.AirGap.Bundle.Tests/BundleImportTests.cs @@ -554,6 +554,7 @@ public sealed class BundleImportTests : IAsyncLifetime private static async Task ComputeFileDigestAsync(string filePath) { await using var stream = File.OpenRead(filePath); +using StellaOps.TestKit; var hash = await SHA256.HashDataAsync(stream); return Convert.ToHexString(hash).ToLowerInvariant(); } diff --git a/src/AirGap/__Tests/StellaOps.AirGap.Importer.Tests/AirGapControllerContractTests.cs b/src/AirGap/__Tests/StellaOps.AirGap.Importer.Tests/AirGapControllerContractTests.cs index 68967b877..378b1ab65 100644 --- a/src/AirGap/__Tests/StellaOps.AirGap.Importer.Tests/AirGapControllerContractTests.cs +++ b/src/AirGap/__Tests/StellaOps.AirGap.Importer.Tests/AirGapControllerContractTests.cs @@ -364,6 +364,7 @@ public sealed class AirGapControllerContractTests { // Arrange - Create a trace context using var activity = new Activity("test-airgap-operation"); +using StellaOps.TestKit; activity.Start(); // Act diff --git a/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocGuardEndpointFilterExtensionsTests.cs b/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocGuardEndpointFilterExtensionsTests.cs index 9b2a51c60..185fc0894 100644 --- a/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocGuardEndpointFilterExtensionsTests.cs +++ b/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocGuardEndpointFilterExtensionsTests.cs @@ -46,6 +46,7 @@ public sealed class AocGuardEndpointFilterExtensionsTests builder.Services.AddAocGuard(); using var app = builder.Build(); +using StellaOps.TestKit; var route = app.MapPost("/guard-object", (GuardPayload _) => TypedResults.Ok()); var result = route.RequireAocGuard(_ => new GuardPayload(JsonDocument.Parse("{}").RootElement)); diff --git a/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocHttpResultsTests.cs b/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocHttpResultsTests.cs index c9e181d65..09ec84fd0 100644 --- a/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocHttpResultsTests.cs +++ b/src/Aoc/__Tests/StellaOps.Aoc.AspNetCore.Tests/AocHttpResultsTests.cs @@ -37,6 +37,7 @@ public sealed class AocHttpResultsTests context.Response.Body.Seek(0, SeekOrigin.Begin); using var document = await JsonDocument.ParseAsync(context.Response.Body, cancellationToken: TestContext.Current.CancellationToken); +using StellaOps.TestKit; var root = document.RootElement; // Assert diff --git a/src/Aoc/__Tests/StellaOps.Aoc.Tests/AocWriteGuardTests.cs b/src/Aoc/__Tests/StellaOps.Aoc.Tests/AocWriteGuardTests.cs index c6831efff..5930eb189 100644 --- a/src/Aoc/__Tests/StellaOps.Aoc.Tests/AocWriteGuardTests.cs +++ b/src/Aoc/__Tests/StellaOps.Aoc.Tests/AocWriteGuardTests.cs @@ -203,6 +203,7 @@ public sealed class AocWriteGuardTests } """); +using StellaOps.TestKit; var result = Guard.Validate(document.RootElement); Assert.False(result.IsValid); diff --git a/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs b/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs index 621ef79d6..a92e95fe9 100644 --- a/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs +++ b/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs @@ -47,6 +47,7 @@ public sealed class DsseEnvelopeSerializerTests "payload hash must reflect the raw payload bytes"); using var document = JsonDocument.Parse(result.CompactJson!); +using StellaOps.TestKit; var keyIds = document.RootElement .GetProperty("signatures") .EnumerateArray() diff --git a/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/EnvelopeSignatureServiceTests.cs b/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/EnvelopeSignatureServiceTests.cs index e7d8be6ef..655a72592 100644 --- a/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/EnvelopeSignatureServiceTests.cs +++ b/src/Attestor/StellaOps.Attestor.Envelope/StellaOps.Attestor.Envelope.Tests/EnvelopeSignatureServiceTests.cs @@ -149,6 +149,7 @@ public sealed class EnvelopeSignatureServiceTests { var jwk = $"{{\"crv\":\"Ed25519\",\"kty\":\"OKP\",\"x\":\"{ToBase64Url(publicKey)}\"}}"; using var sha = SHA256.Create(); +using StellaOps.TestKit; var digest = sha.ComputeHash(Encoding.UTF8.GetBytes(jwk)); return $"sha256:{ToBase64Url(digest)}"; } diff --git a/src/Attestor/StellaOps.Attestor.Envelope/__Tests/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs b/src/Attestor/StellaOps.Attestor.Envelope/__Tests/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs index bee9c3e8c..259d0dd88 100644 --- a/src/Attestor/StellaOps.Attestor.Envelope/__Tests/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs +++ b/src/Attestor/StellaOps.Attestor.Envelope/__Tests/StellaOps.Attestor.Envelope.Tests/DsseEnvelopeSerializerTests.cs @@ -114,6 +114,7 @@ public sealed class DsseEnvelopeSerializerTests Assert.NotNull(result.ExpandedJson); using var expanded = JsonDocument.Parse(result.ExpandedJson!); +using StellaOps.TestKit; var detached = expanded.RootElement.GetProperty("detachedPayload"); Assert.Equal(reference.Uri, detached.GetProperty("uri").GetString()); diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSigningServiceTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSigningServiceTests.cs index 848ae34fb..4aa5b8c03 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSigningServiceTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSigningServiceTests.cs @@ -256,6 +256,7 @@ public sealed class AttestorSigningServiceTests : IDisposable using var metrics = new AttestorMetrics(); using var registry = new AttestorSigningKeyRegistry(options, TimeProvider.System, NullLogger.Instance); +using StellaOps.TestKit; var auditSink = new InMemoryAttestorAuditSink(); var service = new AttestorSigningService( registry, diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSubmissionServiceTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSubmissionServiceTests.cs index ac4215d08..337a86e66 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSubmissionServiceTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorSubmissionServiceTests.cs @@ -277,6 +277,7 @@ public sealed class AttestorSubmissionServiceTests var logger = new NullLogger(); using var metrics = new AttestorMetrics(); +using StellaOps.TestKit; var service = new AttestorSubmissionService( validator, repository, diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorVerificationServiceTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorVerificationServiceTests.cs index 1b780be79..feff960d3 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorVerificationServiceTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/AttestorVerificationServiceTests.cs @@ -700,6 +700,7 @@ public sealed class AttestorVerificationServiceTests private static byte[] ComputeMerkleNode(byte[] left, byte[] right) { using var sha = SHA256.Create(); +using StellaOps.TestKit; var buffer = new byte[1 + left.Length + right.Length]; buffer[0] = 0x01; Buffer.BlockCopy(left, 0, buffer, 1, left.Length); diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/BulkVerificationWorkerTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/BulkVerificationWorkerTests.cs index f982f76c6..92c79a060 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/BulkVerificationWorkerTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/BulkVerificationWorkerTests.cs @@ -24,6 +24,7 @@ public sealed class BulkVerificationWorkerTests var jobStore = new InMemoryBulkVerificationJobStore(); var verificationService = new StubVerificationService(); using var metrics = new AttestorMetrics(); +using StellaOps.TestKit; var options = Options.Create(new AttestorOptions { BulkVerification = new AttestorOptions.BulkVerificationOptions diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/CachedAttestorVerificationServiceTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/CachedAttestorVerificationServiceTests.cs index 81093ee5d..5d849dc81 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/CachedAttestorVerificationServiceTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/CachedAttestorVerificationServiceTests.cs @@ -86,6 +86,7 @@ public sealed class CachedAttestorVerificationServiceTests var options = Options.Create(new AttestorOptions()); using var memoryCache = new MemoryCache(new MemoryCacheOptions()); using var metrics = new AttestorMetrics(); +using StellaOps.TestKit; var cache = new InMemoryAttestorVerificationCache(memoryCache, options, new NullLogger()); var inner = new StubVerificationService(); var service = new CachedAttestorVerificationService( diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/HttpTransparencyWitnessClientTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/HttpTransparencyWitnessClientTests.cs index aa8c59307..f908c4808 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/HttpTransparencyWitnessClientTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/HttpTransparencyWitnessClientTests.cs @@ -136,6 +136,7 @@ public sealed class HttpTransparencyWitnessClientTests using var metrics = new AttestorMetrics(); using var activitySource = new AttestorActivitySource(); +using StellaOps.TestKit; var options = Options.Create(new AttestorOptions { TransparencyWitness = new AttestorOptions.TransparencyWitnessOptions diff --git a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/RekorInclusionVerificationIntegrationTests.cs b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/RekorInclusionVerificationIntegrationTests.cs index 70b125c04..b9a179c64 100644 --- a/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/RekorInclusionVerificationIntegrationTests.cs +++ b/src/Attestor/StellaOps.Attestor/StellaOps.Attestor.Tests/RekorInclusionVerificationIntegrationTests.cs @@ -309,6 +309,7 @@ public sealed class RekorInclusionVerificationIntegrationTests private static byte[] ComputeInteriorHash(byte[] left, byte[] right) { using var sha256 = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var combined = new byte[1 + left.Length + right.Length]; combined[0] = 0x01; // Interior node prefix left.CopyTo(combined, 1); diff --git a/src/Attestor/__Tests/StellaOps.Attestor.Bundle.Tests/SigstoreBundleVerifierTests.cs b/src/Attestor/__Tests/StellaOps.Attestor.Bundle.Tests/SigstoreBundleVerifierTests.cs index 8b6f49087..0c613ade1 100644 --- a/src/Attestor/__Tests/StellaOps.Attestor.Bundle.Tests/SigstoreBundleVerifierTests.cs +++ b/src/Attestor/__Tests/StellaOps.Attestor.Bundle.Tests/SigstoreBundleVerifierTests.cs @@ -328,6 +328,7 @@ public class SigstoreBundleVerifierTests DateTimeOffset.UtcNow.AddDays(-1), DateTimeOffset.UtcNow.AddYears(1)); +using StellaOps.TestKit; return cert.Export(System.Security.Cryptography.X509Certificates.X509ContentType.Cert); } } diff --git a/src/Attestor/__Tests/StellaOps.Attestor.Bundling.Tests/BundleWorkflowIntegrationTests.cs b/src/Attestor/__Tests/StellaOps.Attestor.Bundling.Tests/BundleWorkflowIntegrationTests.cs index 473f6fe1d..557dd3eed 100644 --- a/src/Attestor/__Tests/StellaOps.Attestor.Bundling.Tests/BundleWorkflowIntegrationTests.cs +++ b/src/Attestor/__Tests/StellaOps.Attestor.Bundling.Tests/BundleWorkflowIntegrationTests.cs @@ -406,6 +406,7 @@ public class BundleWorkflowIntegrationTests } using var sha256 = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var combined = string.Join("|", attestations.Select(a => a.EntryId)); var hash = sha256.ComputeHash(System.Text.Encoding.UTF8.GetBytes(combined)); return Convert.ToHexString(hash).ToLowerInvariant(); diff --git a/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/FileSystemRootStoreTests.cs b/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/FileSystemRootStoreTests.cs index 2e4de601d..72ac13f16 100644 --- a/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/FileSystemRootStoreTests.cs +++ b/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/FileSystemRootStoreTests.cs @@ -350,6 +350,7 @@ public class FileSystemRootStoreTests : IDisposable private static X509Certificate2 CreateTestCertificate(string subject) { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var request = new CertificateRequest( subject, rsa, diff --git a/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/OfflineCertChainValidatorTests.cs b/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/OfflineCertChainValidatorTests.cs index b8e8831a5..f76b1e816 100644 --- a/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/OfflineCertChainValidatorTests.cs +++ b/src/Attestor/__Tests/StellaOps.Attestor.Offline.Tests/OfflineCertChainValidatorTests.cs @@ -349,6 +349,7 @@ public class OfflineCertChainValidatorTests private static X509Certificate2 CreateFutureCertificate(string subject) { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var request = new CertificateRequest( subject, rsa, diff --git a/src/Attestor/__Tests/StellaOps.Attestor.ProofChain.Tests/JsonCanonicalizerTests.cs b/src/Attestor/__Tests/StellaOps.Attestor.ProofChain.Tests/JsonCanonicalizerTests.cs index 0d5819cef..a4df830b2 100644 --- a/src/Attestor/__Tests/StellaOps.Attestor.ProofChain.Tests/JsonCanonicalizerTests.cs +++ b/src/Attestor/__Tests/StellaOps.Attestor.ProofChain.Tests/JsonCanonicalizerTests.cs @@ -54,6 +54,7 @@ public sealed class JsonCanonicalizerTests var output = _canonicalizer.Canonicalize(input); using var document = JsonDocument.Parse(output); +using StellaOps.TestKit; Assert.Equal(text, document.RootElement.GetProperty("text").GetString()); } diff --git a/src/Attestor/__Tests/StellaOps.Attestor.Types.Tests/SmartDiffSchemaValidationTests.cs b/src/Attestor/__Tests/StellaOps.Attestor.Types.Tests/SmartDiffSchemaValidationTests.cs index 05a56829e..002b66ba5 100644 --- a/src/Attestor/__Tests/StellaOps.Attestor.Types.Tests/SmartDiffSchemaValidationTests.cs +++ b/src/Attestor/__Tests/StellaOps.Attestor.Types.Tests/SmartDiffSchemaValidationTests.cs @@ -92,6 +92,7 @@ public sealed class SmartDiffSchemaValidationTests } """); +using StellaOps.TestKit; var result = schema.Evaluate(doc.RootElement, new EvaluationOptions { OutputFormat = OutputFormat.List, diff --git a/src/Authority/StellaOps.Authority/StellaOps.Auth.Client.Tests/ServiceCollectionExtensionsTests.cs b/src/Authority/StellaOps.Authority/StellaOps.Auth.Client.Tests/ServiceCollectionExtensionsTests.cs index b1ae145db..4e04d896f 100644 --- a/src/Authority/StellaOps.Authority/StellaOps.Auth.Client.Tests/ServiceCollectionExtensionsTests.cs +++ b/src/Authority/StellaOps.Authority/StellaOps.Auth.Client.Tests/ServiceCollectionExtensionsTests.cs @@ -216,6 +216,7 @@ public class ServiceCollectionExtensionsTests }); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var client = provider.GetRequiredService().CreateClient("notify"); await client.GetAsync("https://notify.example/api"); diff --git a/src/Authority/StellaOps.Authority/StellaOps.Auth.ServerIntegration.Tests/ServiceCollectionExtensionsTests.cs b/src/Authority/StellaOps.Authority/StellaOps.Auth.ServerIntegration.Tests/ServiceCollectionExtensionsTests.cs index 12e650bd5..a95ef024f 100644 --- a/src/Authority/StellaOps.Authority/StellaOps.Auth.ServerIntegration.Tests/ServiceCollectionExtensionsTests.cs +++ b/src/Authority/StellaOps.Authority/StellaOps.Auth.ServerIntegration.Tests/ServiceCollectionExtensionsTests.cs @@ -34,6 +34,7 @@ public class ServiceCollectionExtensionsTests using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var resourceOptions = provider.GetRequiredService>().CurrentValue; var jwtOptions = provider.GetRequiredService>().Get(StellaOpsAuthenticationDefaults.AuthenticationScheme); diff --git a/src/Authority/StellaOps.Authority/StellaOps.Authority.Plugin.Standard.Tests/StandardPluginRegistrarTests.cs b/src/Authority/StellaOps.Authority/StellaOps.Authority.Plugin.Standard.Tests/StandardPluginRegistrarTests.cs index 464a55e41..859cfc0b1 100644 --- a/src/Authority/StellaOps.Authority/StellaOps.Authority.Plugin.Standard.Tests/StandardPluginRegistrarTests.cs +++ b/src/Authority/StellaOps.Authority/StellaOps.Authority.Plugin.Standard.Tests/StandardPluginRegistrarTests.cs @@ -238,6 +238,7 @@ public class StandardPluginRegistrarTests registrar.Register(new AuthorityPluginRegistrationContext(services, pluginContext, configuration)); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var optionsMonitor = provider.GetRequiredService>(); var options = optionsMonitor.Get("standard"); diff --git a/src/Authority/__Tests/StellaOps.Authority.Storage.Postgres.Tests/AuthorityMigrationTests.cs b/src/Authority/__Tests/StellaOps.Authority.Storage.Postgres.Tests/AuthorityMigrationTests.cs index d282405c9..d7a81c9e4 100644 --- a/src/Authority/__Tests/StellaOps.Authority.Storage.Postgres.Tests/AuthorityMigrationTests.cs +++ b/src/Authority/__Tests/StellaOps.Authority.Storage.Postgres.Tests/AuthorityMigrationTests.cs @@ -56,6 +56,7 @@ public sealed class AuthorityMigrationTests { // Arrange await using var connection = new NpgsqlConnection(_fixture.ConnectionString); +using StellaOps.TestKit; await connection.OpenAsync(); // Act - Check schema_migrations table diff --git a/src/Bench/StellaOps.Bench/Scanner.Analyzers/StellaOps.Bench.ScannerAnalyzers.Tests/BenchmarkJsonWriterTests.cs b/src/Bench/StellaOps.Bench/Scanner.Analyzers/StellaOps.Bench.ScannerAnalyzers.Tests/BenchmarkJsonWriterTests.cs index 59f87d541..f287d55cb 100644 --- a/src/Bench/StellaOps.Bench/Scanner.Analyzers/StellaOps.Bench.ScannerAnalyzers.Tests/BenchmarkJsonWriterTests.cs +++ b/src/Bench/StellaOps.Bench/Scanner.Analyzers/StellaOps.Bench.ScannerAnalyzers.Tests/BenchmarkJsonWriterTests.cs @@ -31,6 +31,7 @@ public sealed class BenchmarkJsonWriterTests await BenchmarkJsonWriter.WriteAsync(path, metadata, new[] { report }, CancellationToken.None); using var document = JsonDocument.Parse(await File.ReadAllTextAsync(path)); +using StellaOps.TestKit; var root = document.RootElement; Assert.Equal("1.0", root.GetProperty("schemaVersion").GetString()); diff --git a/src/BinaryIndex/__Tests/StellaOps.BinaryIndex.Core.Tests/FeatureExtractorTests.cs b/src/BinaryIndex/__Tests/StellaOps.BinaryIndex.Core.Tests/FeatureExtractorTests.cs index 2d365bfdf..f846f1c1b 100644 --- a/src/BinaryIndex/__Tests/StellaOps.BinaryIndex.Core.Tests/FeatureExtractorTests.cs +++ b/src/BinaryIndex/__Tests/StellaOps.BinaryIndex.Core.Tests/FeatureExtractorTests.cs @@ -509,6 +509,7 @@ public class BinaryIdentityDeterminismTests using var stream1 = new MemoryStream(content1); using var stream2 = new MemoryStream(content2); +using StellaOps.TestKit; var identity1 = await extractor.ExtractIdentityAsync(stream1); var identity2 = await extractor.ExtractIdentityAsync(stream2); diff --git a/src/Cli/__Tests/StellaOps.Cli.Tests/AttestationBundleVerifierTests.cs b/src/Cli/__Tests/StellaOps.Cli.Tests/AttestationBundleVerifierTests.cs index 61a0d6e90..14d59a9bf 100644 --- a/src/Cli/__Tests/StellaOps.Cli.Tests/AttestationBundleVerifierTests.cs +++ b/src/Cli/__Tests/StellaOps.Cli.Tests/AttestationBundleVerifierTests.cs @@ -404,6 +404,7 @@ public sealed class AttestationBundleVerifierTests : IDisposable { var bytes = Encoding.UTF8.GetBytes(content); using var dataStream = new MemoryStream(bytes); +using StellaOps.TestKit; var entry = new PaxTarEntry(TarEntryType.RegularFile, name) { DataStream = dataStream diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Cccs.Tests/CccsConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Cccs.Tests/CccsConnectorTests.cs index 3c1d645b9..b1e675757 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Cccs.Tests/CccsConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Cccs.Tests/CccsConnectorTests.cs @@ -73,6 +73,7 @@ public sealed class CccsConnectorTests public async Task Fetch_PersistsRawDocumentWithMetadata() { await using var harness = await BuildHarnessAsync(); +using StellaOps.TestKit; SeedFeedResponses(harness.Handler); var connector = harness.ServiceProvider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.CertBund.Tests/CertBundConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.CertBund.Tests/CertBundConnectorTests.cs index 609932c77..778937467 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.CertBund.Tests/CertBundConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.CertBund.Tests/CertBundConnectorTests.cs @@ -83,6 +83,7 @@ public sealed class CertBundConnectorTests public async Task Fetch_PersistsDocumentWithMetadata() { await using var harness = await BuildHarnessAsync(); +using StellaOps.TestKit; SeedResponses(harness.Handler); var connector = harness.ServiceProvider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineConnectorTests.cs index 0874a8773..e24df5ed6 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineConnectorTests.cs @@ -33,6 +33,7 @@ public sealed class AlpineConnectorTests { await using var harness = await BuildHarnessAsync(); +using StellaOps.TestKit; harness.Handler.AddJsonResponse(SecDbUri, BuildMinimalSecDb()); var connector = harness.ServiceProvider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineDependencyInjectionRoutineTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineDependencyInjectionRoutineTests.cs index a1e669b94..6560a6e95 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineDependencyInjectionRoutineTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Alpine.Tests/AlpineDependencyInjectionRoutineTests.cs @@ -44,6 +44,7 @@ public sealed class AlpineDependencyInjectionRoutineTests using var provider = services.BuildServiceProvider(validateScopes: true); +using StellaOps.TestKit; var options = provider.GetRequiredService>().Value; Assert.Equal(new Uri("https://secdb.alpinelinux.org/"), options.BaseUri); Assert.Equal(new[] { "v3.20" }, options.Releases); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Debian.Tests/DebianConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Debian.Tests/DebianConnectorTests.cs index 213a7571e..30006735b 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Debian.Tests/DebianConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Debian.Tests/DebianConnectorTests.cs @@ -73,6 +73,7 @@ public sealed class DebianConnectorTests : IAsyncLifetime { await using var provider = await BuildServiceProviderAsync(); +using StellaOps.TestKit; SeedInitialResponses(); var connector = provider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Suse.Tests/SuseConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Suse.Tests/SuseConnectorTests.cs index b91d547f4..fde9d89c5 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Suse.Tests/SuseConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Suse.Tests/SuseConnectorTests.cs @@ -43,6 +43,7 @@ public sealed class SuseConnectorTests { await using var harness = await BuildHarnessAsync(); +using StellaOps.TestKit; SeedInitialResponses(harness.Handler); var connector = harness.ServiceProvider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Ubuntu.Tests/UbuntuConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Ubuntu.Tests/UbuntuConnectorTests.cs index 7e00887ad..16c35fa70 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Ubuntu.Tests/UbuntuConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Distro.Ubuntu.Tests/UbuntuConnectorTests.cs @@ -42,6 +42,7 @@ public sealed class UbuntuConnectorTests { await using var harness = await BuildHarnessAsync(); +using StellaOps.TestKit; SeedInitialResponses(harness.Handler); var connector = harness.ServiceProvider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ics.Cisa.Tests/IcsCisaConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ics.Cisa.Tests/IcsCisaConnectorTests.cs index 8e6e03c48..a13bbd641 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ics.Cisa.Tests/IcsCisaConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ics.Cisa.Tests/IcsCisaConnectorTests.cs @@ -34,6 +34,7 @@ public sealed class IcsCisaConnectorTests public async Task FetchParseMap_EndToEnd_ProducesCanonicalAdvisories() { await using var harness = await BuildHarnessAsync(); +using StellaOps.TestKit; RegisterResponses(harness.Handler); var connector = harness.ServiceProvider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Kisa.Tests/KisaConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Kisa.Tests/KisaConnectorTests.cs index 441b0b78c..13895b6ae 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Kisa.Tests/KisaConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Kisa.Tests/KisaConnectorTests.cs @@ -351,6 +351,7 @@ public sealed class KisaConnectorTests : IAsyncLifetime using var metrics = new KisaMetricCollector(); +using StellaOps.TestKit; var connector = provider.GetRequiredService(); await connector.FetchAsync(provider, CancellationToken.None); await connector.ParseAsync(provider, CancellationToken.None); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Bdu.Tests/RuBduConnectorSnapshotTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Bdu.Tests/RuBduConnectorSnapshotTests.cs index 179bbd08c..65dbe4766 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Bdu.Tests/RuBduConnectorSnapshotTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Bdu.Tests/RuBduConnectorSnapshotTests.cs @@ -264,6 +264,7 @@ public sealed class RuBduConnectorSnapshotTests : IAsyncLifetime entry.LastWriteTime = new DateTimeOffset(2025, 10, 14, 9, 0, 0, TimeSpan.Zero); using var entryStream = entry.Open(); using var writer = new StreamWriter(entryStream, new UTF8Encoding(encoderShouldEmitUTF8Identifier: false)); +using StellaOps.TestKit; writer.Write(xml); } diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiConnectorTests.cs index 65f82c630..a5daec1e6 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiConnectorTests.cs @@ -88,6 +88,7 @@ public sealed class RuNkckiConnectorTests : IAsyncLifetime public async Task Fetch_ReusesCachedBulletinWhenListingFails() { await using var provider = await BuildServiceProviderAsync(); +using StellaOps.TestKit; SeedListingAndBulletin(); var connector = provider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiJsonParserTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiJsonParserTests.cs index f78dbfe8d..249401981 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiJsonParserTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Ru.Nkcki.Tests/RuNkckiJsonParserTests.cs @@ -43,6 +43,7 @@ public sealed class RuNkckiJsonParserTests """; using var document = JsonDocument.Parse(json); +using StellaOps.TestKit; var dto = RuNkckiJsonParser.Parse(document.RootElement); Assert.Equal("BDU:2025-00001", dto.FstecId); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/MirrorSignatureVerifierTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/MirrorSignatureVerifierTests.cs index 74f0d4498..70ba559c9 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/MirrorSignatureVerifierTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/MirrorSignatureVerifierTests.cs @@ -145,6 +145,7 @@ public sealed class MirrorSignatureVerifierTests private static string WritePublicKeyPem(CryptoSigningKey signingKey) { using var ecdsa = ECDsa.Create(signingKey.PublicParameters); +using StellaOps.TestKit; var info = ecdsa.ExportSubjectPublicKeyInfo(); var pem = PemEncoding.Write("PUBLIC KEY", info); var path = Path.Combine(Path.GetTempPath(), $"stellaops-mirror-{Guid.NewGuid():N}.pem"); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/StellaOpsMirrorConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/StellaOpsMirrorConnectorTests.cs index 04f9d4da7..271072856 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/StellaOpsMirrorConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.StellaOpsMirror.Tests/StellaOpsMirrorConnectorTests.cs @@ -427,6 +427,7 @@ public sealed class StellaOpsMirrorConnectorTests : IAsyncLifetime ArgumentNullException.ThrowIfNull(signingKey); var path = Path.Combine(Path.GetTempPath(), $"stellaops-mirror-{Guid.NewGuid():N}.pem"); using var ecdsa = ECDsa.Create(signingKey.PublicParameters); +using StellaOps.TestKit; var publicKeyInfo = ecdsa.ExportSubjectPublicKeyInfo(); var pem = PemEncoding.Write("PUBLIC KEY", publicKeyInfo); File.WriteAllText(path, pem); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Vndr.Msrc.Tests/MsrcConnectorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Vndr.Msrc.Tests/MsrcConnectorTests.cs index 45ccb23e0..3b74afc30 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Connector.Vndr.Msrc.Tests/MsrcConnectorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Connector.Vndr.Msrc.Tests/MsrcConnectorTests.cs @@ -50,6 +50,7 @@ public sealed class MsrcConnectorTests : IAsyncLifetime public async Task FetchParseMap_ProducesCanonicalAdvisory() { await using var provider = await BuildServiceProviderAsync(); +using StellaOps.TestKit; SeedResponses(); var connector = provider.GetRequiredService(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobCoordinatorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobCoordinatorTests.cs index c9e7c416b..c928c529b 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobCoordinatorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobCoordinatorTests.cs @@ -270,6 +270,7 @@ public sealed class JobCoordinatorTests jobOptions.Definitions.Add(definition.Kind, definition); using var diagnostics = new JobDiagnostics(); +using StellaOps.TestKit; var coordinator = new JobCoordinator( Options.Create(jobOptions), jobStore, diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobPluginRegistrationExtensionsTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobPluginRegistrationExtensionsTests.cs index 1ed86309b..21ba3873a 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobPluginRegistrationExtensionsTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobPluginRegistrationExtensionsTests.cs @@ -51,6 +51,7 @@ public sealed class JobPluginRegistrationExtensionsTests descriptor => descriptor.ServiceType.FullName == typeof(PluginRoutineExecuted).FullName); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var schedulerOptions = provider.GetRequiredService>().Value; Assert.True(schedulerOptions.Definitions.TryGetValue(PluginJob.JobKind, out var definition)); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobSchedulerBuilderTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobSchedulerBuilderTests.cs index 671350290..b7910fd73 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobSchedulerBuilderTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Core.Tests/JobSchedulerBuilderTests.cs @@ -49,6 +49,7 @@ public sealed class JobSchedulerBuilderTests builder.AddJob(kind: "jobs:defaults"); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var options = provider.GetRequiredService>().Value; Assert.True(options.Definitions.TryGetValue("jobs:defaults", out var definition)); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonExporterDependencyInjectionRoutineTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonExporterDependencyInjectionRoutineTests.cs index e6ae59a37..c5876f268 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonExporterDependencyInjectionRoutineTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonExporterDependencyInjectionRoutineTests.cs @@ -44,6 +44,7 @@ public sealed class JsonExporterDependencyInjectionRoutineTests routine.Register(services, configuration); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var optionsAccessor = provider.GetRequiredService>(); var options = optionsAccessor.Value; diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonFeedExporterTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonFeedExporterTests.cs index 6e295aaff..ab243a96c 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonFeedExporterTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Exporter.Json.Tests/JsonFeedExporterTests.cs @@ -433,6 +433,7 @@ public sealed class JsonFeedExporterTests : IDisposable private static string WriteSigningKey(string directory) { using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP256); +using StellaOps.TestKit; var pkcs8 = ecdsa.ExportPkcs8PrivateKey(); var pem = BuildPem("PRIVATE KEY", pkcs8); var path = Path.Combine(directory, $"mirror-key-{Guid.NewGuid():N}.pem"); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Exporter.TrivyDb.Tests/TrivyDbFeedExporterTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Exporter.TrivyDb.Tests/TrivyDbFeedExporterTests.cs index a4e1db616..13823c9e6 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Exporter.TrivyDb.Tests/TrivyDbFeedExporterTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Exporter.TrivyDb.Tests/TrivyDbFeedExporterTests.cs @@ -1198,6 +1198,7 @@ public sealed class TrivyDbFeedExporterTests : IDisposable var archivePath = Path.Combine(workingDirectory, "db.tar.gz"); File.WriteAllBytes(archivePath, _payload); using var sha256 = SHA256.Create(); +using StellaOps.TestKit; var digest = "sha256:" + Convert.ToHexString(sha256.ComputeHash(_payload)).ToLowerInvariant(); return Task.FromResult(new TrivyDbBuilderResult( diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Merge.Tests/AdvisoryPrecedenceMergerTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Merge.Tests/AdvisoryPrecedenceMergerTests.cs index b8d69962f..7f92ff59b 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Merge.Tests/AdvisoryPrecedenceMergerTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Merge.Tests/AdvisoryPrecedenceMergerTests.cs @@ -498,6 +498,7 @@ public sealed class AdvisoryPrecedenceMergerTests var logger = new TestLogger(); using var metrics = new MetricCollector("StellaOps.Concelier.Merge"); +using StellaOps.TestKit; var merger = new AdvisoryPrecedenceMerger( new AffectedPackagePrecedenceResolver(), options, diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/CanonicalJsonSerializerTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/CanonicalJsonSerializerTests.cs index d1eda1632..1dbacb7c3 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/CanonicalJsonSerializerTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/CanonicalJsonSerializerTests.cs @@ -130,6 +130,7 @@ public sealed class CanonicalJsonSerializerTests var json = CanonicalJsonSerializer.Serialize(advisory); using var document = JsonDocument.Parse(json); +using StellaOps.TestKit; var rangeElement = document.RootElement .GetProperty("affectedPackages")[0] .GetProperty("versionRanges")[0]; diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/OsvGhsaParityDiagnosticsTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/OsvGhsaParityDiagnosticsTests.cs index beb691760..8c529b2a2 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/OsvGhsaParityDiagnosticsTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/OsvGhsaParityDiagnosticsTests.cs @@ -56,6 +56,7 @@ public sealed class OsvGhsaParityDiagnosticsTests var measurements = new List<(string Instrument, long Value, IReadOnlyDictionary Tags)>(); using var listener = CreateListener(measurements); +using StellaOps.TestKit; OsvGhsaParityDiagnostics.RecordReport(report, ""); listener.Dispose(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/ProvenanceDiagnosticsTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/ProvenanceDiagnosticsTests.cs index 9c033ac31..d08762663 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/ProvenanceDiagnosticsTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.Models.Tests/ProvenanceDiagnosticsTests.cs @@ -114,6 +114,7 @@ public sealed class ProvenanceDiagnosticsTests var measurements = new List<(string Instrument, long Value, IReadOnlyDictionary Tags)>(); using var listener = CreateListener(measurements, "concelier.range.primitives"); +using StellaOps.TestKit; ProvenanceDiagnostics.RecordRangePrimitive("source-D", range); listener.Dispose(); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.SbomIntegration.Tests/SbomParserTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.SbomIntegration.Tests/SbomParserTests.cs index df972bf62..79edb8277 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.SbomIntegration.Tests/SbomParserTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.SbomIntegration.Tests/SbomParserTests.cs @@ -508,6 +508,7 @@ public class SbomParserTests using var stream = new MemoryStream(Encoding.UTF8.GetBytes(content)); +using StellaOps.TestKit; // Act var result = await _parser.ParseAsync(stream, SbomFormat.CycloneDX); diff --git a/src/Concelier/__Tests/StellaOps.Concelier.WebService.Tests/ConcelierTimelineCursorTests.cs b/src/Concelier/__Tests/StellaOps.Concelier.WebService.Tests/ConcelierTimelineCursorTests.cs index 7513446ae..caf852921 100644 --- a/src/Concelier/__Tests/StellaOps.Concelier.WebService.Tests/ConcelierTimelineCursorTests.cs +++ b/src/Concelier/__Tests/StellaOps.Concelier.WebService.Tests/ConcelierTimelineCursorTests.cs @@ -25,6 +25,7 @@ public class ConcelierTimelineCursorTests : IClassFixture.Instance); using var stream = new MemoryStream(new byte[] { 1, 2, 3 }); +using StellaOps.TestKit; await client.PutObjectAsync("bucket", "key", stream, new Dictionary { ["a"] = "b" }, default); mock.Verify(x => x.PutObjectAsync(It.Is(r => r.Metadata["a"] == "b"), default), Times.Once); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyBinderTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyBinderTests.cs index 200440443..f83c9c8d4 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyBinderTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyBinderTests.cs @@ -92,6 +92,7 @@ public sealed class VexPolicyBinderTests public void Bind_Stream_SupportsEncoding() { using var stream = new MemoryStream(Encoding.UTF8.GetBytes(JsonPolicy)); +using StellaOps.TestKit; var result = VexPolicyBinder.Bind(stream, VexPolicyDocumentFormat.Json); Assert.True(result.Success); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyDiagnosticsTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyDiagnosticsTests.cs index d2eee8296..119e80521 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyDiagnosticsTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Core.Tests/VexPolicyDiagnosticsTests.cs @@ -79,6 +79,7 @@ public class VexPolicyDiagnosticsTests public void PolicyProvider_ComputesRevisionAndDigest_AndEmitsTelemetry() { using var listener = new MeterListener(); +using StellaOps.TestKit; var reloadMeasurements = 0; string? lastRevision = null; listener.InstrumentPublished += (instrument, _) => diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/MirrorBundlePublisherTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/MirrorBundlePublisherTests.cs index 0b5168368..720919499 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/MirrorBundlePublisherTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/MirrorBundlePublisherTests.cs @@ -289,6 +289,7 @@ public sealed class MirrorBundlePublisherTests private static string ComputeSha256(byte[] bytes) { using var sha = SHA256.Create(); +using StellaOps.TestKit; var digest = sha.ComputeHash(bytes); return "sha256:" + Convert.ToHexString(digest).ToLowerInvariant(); } diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/OfflineBundleArtifactStoreTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/OfflineBundleArtifactStoreTests.cs index 67277cb4c..f0d0f3d74 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/OfflineBundleArtifactStoreTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/OfflineBundleArtifactStoreTests.cs @@ -38,6 +38,7 @@ public sealed class OfflineBundleArtifactStoreTests Assert.True(fs.FileExists(manifestPath)); await using var manifestStream = fs.File.OpenRead(manifestPath); using var document = await JsonDocument.ParseAsync(manifestStream); +using StellaOps.TestKit; var artifacts = document.RootElement.GetProperty("artifacts"); Assert.True(artifacts.GetArrayLength() >= 1); var first = artifacts.EnumerateArray().First(); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/S3ArtifactStoreTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/S3ArtifactStoreTests.cs index 015b22daf..f76ec86cf 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/S3ArtifactStoreTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Export.Tests/S3ArtifactStoreTests.cs @@ -71,6 +71,7 @@ public sealed class S3ArtifactStoreTests public Task PutObjectAsync(string bucketName, string key, Stream content, IDictionary metadata, CancellationToken cancellationToken) { using var ms = new MemoryStream(); +using StellaOps.TestKit; content.CopyTo(ms); var bytes = ms.ToArray(); PutCalls.GetOrAdd(bucketName, _ => new List()).Add(new S3Entry(key, bytes, new Dictionary(metadata))); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Formats.CSAF.Tests/CsafExporterTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Formats.CSAF.Tests/CsafExporterTests.cs index d2d6689a9..ce36e2f68 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Formats.CSAF.Tests/CsafExporterTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Formats.CSAF.Tests/CsafExporterTests.cs @@ -60,6 +60,7 @@ public sealed class CsafExporterTests stream.Position = 0; using var document = JsonDocument.Parse(stream); +using StellaOps.TestKit; var root = document.RootElement; root.GetProperty("document").GetProperty("tracking").GetProperty("id").GetString()!.Should().StartWith("stellaops:csaf"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Formats.CycloneDX.Tests/CycloneDxExporterTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Formats.CycloneDX.Tests/CycloneDxExporterTests.cs index 400ce2f62..59da3fc3f 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Formats.CycloneDX.Tests/CycloneDxExporterTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Formats.CycloneDX.Tests/CycloneDxExporterTests.cs @@ -44,6 +44,7 @@ public sealed class CycloneDxExporterTests stream.Position = 0; using var document = JsonDocument.Parse(stream); +using StellaOps.TestKit; var root = document.RootElement; root.GetProperty("bomFormat").GetString().Should().Be("CycloneDX"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Formats.OpenVEX.Tests/OpenVexExporterTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Formats.OpenVEX.Tests/OpenVexExporterTests.cs index 7c77f99de..04a977caa 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Formats.OpenVEX.Tests/OpenVexExporterTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Formats.OpenVEX.Tests/OpenVexExporterTests.cs @@ -38,6 +38,7 @@ public sealed class OpenVexExporterTests stream.Position = 0; using var document = JsonDocument.Parse(stream); +using StellaOps.TestKit; var root = document.RootElement; root.GetProperty("document").GetProperty("author").GetString().Should().Be("StellaOps Excititor"); root.GetProperty("statements").GetArrayLength().Should().Be(1); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Storage.Postgres.Tests/PostgresAppendOnlyLinksetStoreTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Storage.Postgres.Tests/PostgresAppendOnlyLinksetStoreTests.cs index 8feae18db..c69ae87d8 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Storage.Postgres.Tests/PostgresAppendOnlyLinksetStoreTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Storage.Postgres.Tests/PostgresAppendOnlyLinksetStoreTests.cs @@ -50,6 +50,7 @@ public sealed class PostgresAppendOnlyLinksetStoreTests : IAsyncLifetime if (stream is not null) { using var reader = new StreamReader(stream); +using StellaOps.TestKit; var sql = await reader.ReadToEndAsync(); await _fixture.Fixture.ExecuteSqlAsync(sql); } diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapImportEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapImportEndpointTests.cs index f8f93509c..045b02f56 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapImportEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapImportEndpointTests.cs @@ -107,6 +107,7 @@ public class AirgapImportEndpointTests }); using var client = factory.CreateClient(new WebApplicationFactoryClientOptions { AllowAutoRedirect = false }); +using StellaOps.TestKit; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "vex.admin"); var request = new AirgapImportRequest diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapSignerTrustServiceTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapSignerTrustServiceTests.cs index f1c0a8975..ed965172d 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapSignerTrustServiceTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AirgapSignerTrustServiceTests.cs @@ -64,6 +64,7 @@ public class AirgapSignerTrustServiceTests public void Validate_Allows_On_Metadata_Match() { using var temp = ConnectorMetadataTempFile(); +using StellaOps.TestKit; Environment.SetEnvironmentVariable("STELLAOPS_CONNECTOR_SIGNER_METADATA_PATH", temp.Path); var service = new AirgapSignerTrustService(NullLogger.Instance); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AttestationVerifyEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AttestationVerifyEndpointTests.cs index 445dab9fb..a36d6df4a 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AttestationVerifyEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/AttestationVerifyEndpointTests.cs @@ -65,6 +65,7 @@ public sealed class AttestationVerifyEndpointTests { using var factory = new TestWebApplicationFactory( configureServices: services => TestServiceOverrides.Apply(services)); +using StellaOps.TestKit; var client = factory.CreateClient(); var request = new AttestationVerifyRequest diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceLockerEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceLockerEndpointTests.cs index 383fba14d..9bd62537f 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceLockerEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceLockerEndpointTests.cs @@ -99,6 +99,7 @@ public sealed class EvidenceLockerEndpointTests : IAsyncLifetime await _stubStore.SaveAsync(record, CancellationToken.None); using var client = _factory.WithWebHostBuilder(_ => { }).CreateClient(); +using StellaOps.TestKit; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "vex.read"); var response = await client.GetAsync($"/evidence/vex/locker/{record.BundleId}/manifest/file"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceTelemetryTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceTelemetryTests.cs index d48057d1e..290635462 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceTelemetryTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/EvidenceTelemetryTests.cs @@ -43,6 +43,7 @@ public sealed class EvidenceTelemetryTests using var listener = CreateListener((instrument, value, tags) => { measurements.Add((instrument.Name, value, tags.ToArray())); +using StellaOps.TestKit; }); var now = DateTimeOffset.UtcNow; diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/IngestEndpointsTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/IngestEndpointsTests.cs index d41fdce5e..56d6edbe2 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/IngestEndpointsTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/IngestEndpointsTests.cs @@ -202,6 +202,7 @@ public sealed class IngestEndpointsTests Assert.Equal(TimeSpan.FromDays(2), _orchestrator.LastReconcileOptions?.MaxAge); using var document = JsonDocument.Parse(JsonSerializer.Serialize(ok.Value)); +using StellaOps.TestKit; Assert.Equal("reconciled", document.RootElement.GetProperty("providers")[0].GetProperty("action").GetString()); } diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/MirrorEndpointsTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/MirrorEndpointsTests.cs index e23948da5..bc246495c 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/MirrorEndpointsTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/MirrorEndpointsTests.cs @@ -79,6 +79,7 @@ public sealed class MirrorEndpointsTests : IDisposable response.EnsureSuccessStatusCode(); using var document = JsonDocument.Parse(await response.Content.ReadAsStringAsync()); +using StellaOps.TestKit; var exports = document.RootElement.GetProperty("exports"); Assert.Equal(1, exports.GetArrayLength()); var entry = exports[0]; diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ObservabilityEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ObservabilityEndpointTests.cs index 02a6501a3..27e83e1e4 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ObservabilityEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ObservabilityEndpointTests.cs @@ -90,6 +90,7 @@ public sealed class ObservabilityEndpointTests : IDisposable private void SeedDatabase() { using var scope = _factory.Services.CreateScope(); +using StellaOps.TestKit; var rawStore = scope.ServiceProvider.GetRequiredService(); var linksetStore = scope.ServiceProvider.GetRequiredService(); var providerStore = scope.ServiceProvider.GetRequiredService(); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/PolicyEndpointsTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/PolicyEndpointsTests.cs index 31c2bcf68..9b04ef4c2 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/PolicyEndpointsTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/PolicyEndpointsTests.cs @@ -27,6 +27,7 @@ public sealed class PolicyEndpointsTests }); using var client = factory.CreateClient(new() { AllowAutoRedirect = false }); +using StellaOps.TestKit; client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "vex.read"); client.DefaultRequestHeaders.Add("X-Stella-Tenant", "test"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ResolveEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ResolveEndpointTests.cs index 26eccc951..663af5157 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ResolveEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/ResolveEndpointTests.cs @@ -157,6 +157,7 @@ public sealed class ResolveEndpointTests : IDisposable private async Task SeedClaimAsync(string vulnerabilityId, string productKey, string providerId) { await using var scope = _factory.Services.CreateAsyncScope(); +using StellaOps.TestKit; var store = scope.ServiceProvider.GetRequiredService(); var timeProvider = scope.ServiceProvider.GetRequiredService(); var observedAt = timeProvider.GetUtcNow(); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/RiskFeedEndpointsTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/RiskFeedEndpointsTests.cs index c770814aa..26ef9b36b 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/RiskFeedEndpointsTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/RiskFeedEndpointsTests.cs @@ -141,6 +141,7 @@ public sealed class RiskFeedEndpointsTests }); using var client = factory.CreateClient(new() { AllowAutoRedirect = false }); +using StellaOps.TestKit; client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "vex.read"); client.DefaultRequestHeaders.Add("X-Stella-Tenant", TestTenant); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexAttestationLinkEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexAttestationLinkEndpointTests.cs index 80bf96fc0..c2191a1dc 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexAttestationLinkEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexAttestationLinkEndpointTests.cs @@ -38,6 +38,7 @@ public sealed class VexAttestationLinkEndpointTests : IDisposable public async Task GetAttestationLink_ReturnsServiceUnavailable() { using var client = _factory.CreateClient(new WebApplicationFactoryClientOptions { AllowAutoRedirect = false }); +using StellaOps.TestKit; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "vex.read"); var response = await client.GetAsync("/v1/vex/attestations/att-123"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexEvidenceChunksEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexEvidenceChunksEndpointTests.cs index 2987a9a52..daa541bc4 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexEvidenceChunksEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexEvidenceChunksEndpointTests.cs @@ -57,6 +57,7 @@ public sealed class VexEvidenceChunksEndpointTests : IDisposable public async Task ChunksEndpoint_ReportsMigrationStatusHeaders() { using var client = _factory.CreateClient(new WebApplicationFactoryClientOptions { AllowAutoRedirect = false }); +using StellaOps.TestKit; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "vex.read"); client.DefaultRequestHeaders.Add("X-Stella-Tenant", "tests"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexGuardSchemaTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexGuardSchemaTests.cs index 7be17c411..2e5db3262 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexGuardSchemaTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexGuardSchemaTests.cs @@ -79,6 +79,7 @@ public sealed class VexGuardSchemaTests var node = JsonNode.Parse(json)!.AsObject(); mutate?.Invoke(node); using var document = JsonDocument.Parse(node.ToJsonString()); +using StellaOps.TestKit; return Guard.Validate(document.RootElement); } diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexLinksetListEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexLinksetListEndpointTests.cs index f5f5c6d3f..f21fb5ad4 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexLinksetListEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexLinksetListEndpointTests.cs @@ -71,6 +71,7 @@ public sealed class VexLinksetListEndpointTests : IDisposable private void SeedObservations() { using var scope = _factory.Services.CreateScope(); +using StellaOps.TestKit; var store = scope.ServiceProvider.GetRequiredService(); var scopeMetadata = new VexProductScope( diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexObservationListEndpointTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexObservationListEndpointTests.cs index 380c022b9..3cb2be50b 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexObservationListEndpointTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexObservationListEndpointTests.cs @@ -67,6 +67,7 @@ public sealed class VexObservationListEndpointTests : IDisposable private void SeedObservation() { using var scope = _factory.Services.CreateScope(); +using StellaOps.TestKit; var store = scope.ServiceProvider.GetRequiredService(); var now = DateTimeOffset.Parse("2025-12-01T00:00:00Z"); diff --git a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexRawEndpointsTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexRawEndpointsTests.cs index ce8360a81..301d794c3 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexRawEndpointsTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.WebService.Tests/VexRawEndpointsTests.cs @@ -76,6 +76,7 @@ public sealed class VexRawEndpointsTests private static VexIngestRequest BuildVexIngestRequest() { using var contentDocument = JsonDocument.Parse("{\"vex\":\"payload\"}"); +using StellaOps.TestKit; return new VexIngestRequest( ProviderId: "excititor:test", Source: new VexIngestSourceRequest("vendor:test", "connector:test", "1.0.0", "csaf"), diff --git a/src/Excititor/__Tests/StellaOps.Excititor.Worker.Tests/TenantAuthorityClientFactoryTests.cs b/src/Excititor/__Tests/StellaOps.Excititor.Worker.Tests/TenantAuthorityClientFactoryTests.cs index 9318ede72..7bf225038 100644 --- a/src/Excititor/__Tests/StellaOps.Excititor.Worker.Tests/TenantAuthorityClientFactoryTests.cs +++ b/src/Excititor/__Tests/StellaOps.Excititor.Worker.Tests/TenantAuthorityClientFactoryTests.cs @@ -22,6 +22,7 @@ public sealed class TenantAuthorityClientFactoryTests using var client = factory.Create("tenant-a"); +using StellaOps.TestKit; client.BaseAddress.Should().Be(new Uri("https://authority.example/")); client.DefaultRequestHeaders.TryGetValues("X-Tenant", out var values).Should().BeTrue(); values.Should().ContainSingle().Which.Should().Be("tenant-a"); diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportCenterClientTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportCenterClientTests.cs index 3288ba64c..b08bc0df2 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportCenterClientTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportCenterClientTests.cs @@ -196,6 +196,7 @@ public sealed class ExportCenterClientTests Assert.NotNull(stream); using var ms = new MemoryStream(); +using StellaOps.TestKit; await stream.CopyToAsync(ms); Assert.Equal(bundleContent, ms.ToArray()); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportDownloadHelperTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportDownloadHelperTests.cs index 01e97711f..7f1814c84 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportDownloadHelperTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Client.Tests/ExportDownloadHelperTests.cs @@ -130,6 +130,7 @@ public sealed class ExportDownloadHelperTests : IDisposable using var source = new MemoryStream(content); using var destination = new MemoryStream(); +using StellaOps.TestKit; var bytesCopied = await ExportDownloadHelper.CopyWithProgressAsync(source, destination); Assert.Equal(content.Length, bytesCopied); diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/AttestationBundleBuilderTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/AttestationBundleBuilderTests.cs index 020c005cc..4f50daaed 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/AttestationBundleBuilderTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/AttestationBundleBuilderTests.cs @@ -549,6 +549,7 @@ internal sealed class FakeCryptoHash : StellaOps.Cryptography.ICryptoHash public ValueTask ComputeHashAsync(Stream stream, string? algorithmId = null, CancellationToken cancellationToken = default) { using var sha256 = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var hash = sha256.ComputeHash(stream); return new ValueTask(hash); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BootstrapPackBuilderTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BootstrapPackBuilderTests.cs index 9e45d90fb..de4bd1668 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BootstrapPackBuilderTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BootstrapPackBuilderTests.cs @@ -349,6 +349,7 @@ public sealed class BootstrapPackBuilderTests : IDisposable using var gzip = new GZipStream(packStream, CompressionMode.Decompress, leaveOpen: true); using var tar = new TarReader(gzip, leaveOpen: true); +using StellaOps.TestKit; TarEntry? entry; while ((entry = tar.GetNextEntry()) is not null) { diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BundleEncryptionServiceTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BundleEncryptionServiceTests.cs index 8c0ce16e7..e4ed65dd9 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BundleEncryptionServiceTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/BundleEncryptionServiceTests.cs @@ -554,6 +554,7 @@ public class BundleEncryptionServiceTests : IDisposable public ValueTask ComputeHashAsync(Stream stream, string? algorithmId = null, CancellationToken cancellationToken = default) { using var sha256 = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var hash = sha256.ComputeHash(stream); return new ValueTask(hash); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineBundleBuilderTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineBundleBuilderTests.cs index e243c0781..b4a5745a3 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineBundleBuilderTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineBundleBuilderTests.cs @@ -207,6 +207,7 @@ public sealed class DevPortalOfflineBundleBuilderTests } using var memory = new MemoryStream(); +using StellaOps.TestKit; entry.DataStream.CopyTo(memory); result[entry.Name] = memory.ToArray(); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineJobTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineJobTests.cs index 3b67a3894..10f4d8d75 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineJobTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/DevPortalOfflineJobTests.cs @@ -133,6 +133,7 @@ public class DevPortalOfflineJobTests CancellationToken cancellationToken) { using var memory = new MemoryStream(); +using StellaOps.TestKit; content.CopyTo(memory); var bytes = memory.ToArray(); content.Seek(0, SeekOrigin.Begin); diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/HmacDevPortalOfflineManifestSignerTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/HmacDevPortalOfflineManifestSignerTests.cs index 82b575cce..f36d28301 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/HmacDevPortalOfflineManifestSignerTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/HmacDevPortalOfflineManifestSignerTests.cs @@ -83,6 +83,7 @@ public class HmacDevPortalOfflineManifestSignerTests var secret = Convert.FromBase64String(options.Secret); using var hmac = new HMACSHA256(secret); +using StellaOps.TestKit; var signature = hmac.ComputeHash(pae); return Convert.ToBase64String(signature); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleBuilderTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleBuilderTests.cs index 1c5d22079..ea85cd650 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleBuilderTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleBuilderTests.cs @@ -387,6 +387,7 @@ public sealed class MirrorBundleBuilderTests : IDisposable using var gzip = new GZipStream(bundleStream, CompressionMode.Decompress, leaveOpen: true); using var tar = new TarReader(gzip, leaveOpen: true); +using StellaOps.TestKit; TarEntry? entry; while ((entry = tar.GetNextEntry()) is not null) { diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleSigningTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleSigningTests.cs index f66eb6983..7a9d6b90d 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleSigningTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorBundleSigningTests.cs @@ -161,6 +161,7 @@ public sealed class MirrorBundleSigningTests { using var nonSeekable = new NonSeekableMemoryStream(Encoding.UTF8.GetBytes("test")); +using StellaOps.TestKit; await Assert.ThrowsAsync(() => _signer.SignArchiveAsync(nonSeekable)); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorDeltaAdapterTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorDeltaAdapterTests.cs index b41af7b07..5d0426a7e 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorDeltaAdapterTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/MirrorDeltaAdapterTests.cs @@ -402,6 +402,7 @@ public class MirrorDeltaAdapterTests : IDisposable public ValueTask ComputeHashAsync(Stream stream, string? algorithmId = null, CancellationToken cancellationToken = default) { using var sha256 = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var hash = sha256.ComputeHash(stream); return new ValueTask(hash); } diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/PortableEvidenceExportBuilderTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/PortableEvidenceExportBuilderTests.cs index 00c27d310..397f2328a 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/PortableEvidenceExportBuilderTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/PortableEvidenceExportBuilderTests.cs @@ -374,6 +374,7 @@ public sealed class PortableEvidenceExportBuilderTests : IDisposable using var gzip = new GZipStream(exportStream, CompressionMode.Decompress, leaveOpen: true); using var tar = new TarReader(gzip, leaveOpen: true); +using StellaOps.TestKit; TarEntry? entry; while ((entry = tar.GetNextEntry()) is not null) { diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleBuilderTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleBuilderTests.cs index 8b394abcb..903cc0bfe 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleBuilderTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleBuilderTests.cs @@ -58,6 +58,7 @@ public sealed class RiskBundleBuilderTests public void Build_WhenMandatoryProviderMissing_Throws() { using var temp = new TempDir(); +using StellaOps.TestKit; var epss = temp.WriteFile("epss.csv", "cve,score\n"); var request = new RiskBundleBuildRequest( diff --git a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleJobTests.cs b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleJobTests.cs index 473c31a5d..e38996e76 100644 --- a/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleJobTests.cs +++ b/src/ExportCenter/StellaOps.ExportCenter/StellaOps.ExportCenter.Tests/RiskBundleJobTests.cs @@ -66,6 +66,7 @@ public sealed class RiskBundleJobTests public Task StoreAsync(RiskBundleObjectStoreOptions options, Stream content, CancellationToken cancellationToken = default) { using var ms = new MemoryStream(); +using StellaOps.TestKit; content.CopyTo(ms); _store[options.StorageKey] = ms.ToArray(); return Task.FromResult(new RiskBundleStorageMetadata(options.StorageKey, ms.Length, options.ContentType)); diff --git a/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerIntegrationTests.cs b/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerIntegrationTests.cs index 9456bc10f..2ff729ba5 100644 --- a/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerIntegrationTests.cs +++ b/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerIntegrationTests.cs @@ -465,6 +465,7 @@ internal class LedgerProjectionReducer private static string ComputeCycleHash(IList events) { using var sha256 = SHA256.Create(); +using StellaOps.TestKit; var combined = new StringBuilder(); foreach (var evt in events.OrderBy(e => e.Sequence)) diff --git a/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerWebServiceContractTests.cs b/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerWebServiceContractTests.cs index ed3d5819a..cd55cb278 100644 --- a/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerWebServiceContractTests.cs +++ b/src/Findings/StellaOps.Findings.Ledger.Tests/FindingsLedgerWebServiceContractTests.cs @@ -272,6 +272,7 @@ public sealed class FindingsLedgerWebServiceContractTests : IDisposable var content = await response.Content.ReadAsStringAsync(); using var doc = JsonDocument.Parse(content); +using StellaOps.TestKit; // Navigate to FindingSummary schema if (doc.RootElement.TryGetProperty("components", out var components) && components.TryGetProperty("schemas", out var schemas) && diff --git a/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/HarnessRunnerTests.cs b/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/HarnessRunnerTests.cs index 64c3dea1e..5193171fe 100644 --- a/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/HarnessRunnerTests.cs +++ b/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/HarnessRunnerTests.cs @@ -23,6 +23,7 @@ public class HarnessRunnerTests var json = await File.ReadAllTextAsync(tempReport); using var doc = JsonDocument.Parse(json); +using StellaOps.TestKit; doc.RootElement.GetProperty("eventsWritten").GetInt64().Should().BeGreaterThan(0); doc.RootElement.GetProperty("status").GetString().Should().Be("pass"); doc.RootElement.GetProperty("tenant").GetString().Should().Be("tenant-test"); diff --git a/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/LedgerMetricsTests.cs b/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/LedgerMetricsTests.cs index a833429ec..0b6ab3f42 100644 --- a/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/LedgerMetricsTests.cs +++ b/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/LedgerMetricsTests.cs @@ -195,6 +195,7 @@ public class LedgerMetricsTests public void VersionInfoGauge_EmitsConstantOne() { using var listener = CreateListener(); +using StellaOps.TestKit; var measurements = new List<(long Value, KeyValuePair[] Tags)>(); listener.SetMeasurementEventCallback((instrument, measurement, tags, state) => diff --git a/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/PolicyEngineEvaluationServiceTests.cs b/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/PolicyEngineEvaluationServiceTests.cs index 43fc8ad02..259057d93 100644 --- a/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/PolicyEngineEvaluationServiceTests.cs +++ b/src/Findings/__Tests/StellaOps.Findings.Ledger.Tests/PolicyEngineEvaluationServiceTests.cs @@ -90,6 +90,7 @@ public sealed class PolicyEngineEvaluationServiceTests var factory = new TestHttpClientFactory(handler); var options = CreateOptions(baseAddress: null); using var cache = new PolicyEvaluationCache(options.PolicyEngine, NullLogger.Instance); +using StellaOps.TestKit; var inline = new InlinePolicyEvaluationService(NullLogger.Instance); var service = new PolicyEngineEvaluationService(factory, inline, cache, Microsoft.Extensions.Options.Options.Create(options), NullLogger.Instance); diff --git a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/GraphApiContractTests.cs b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/GraphApiContractTests.cs index 1df527aec..d095331bb 100644 --- a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/GraphApiContractTests.cs +++ b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/GraphApiContractTests.cs @@ -414,6 +414,7 @@ public sealed class GraphApiContractTests : IDisposable // Arrange using var metrics = new GraphMetrics(); +using StellaOps.TestKit; // Assert - Verify meter is correctly configured metrics.Meter.Should().NotBeNull(); metrics.Meter.Name.Should().Be("StellaOps.Graph.Api"); diff --git a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/MetricsTests.cs b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/MetricsTests.cs index 8d7cb7e24..e14242a33 100644 --- a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/MetricsTests.cs +++ b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/MetricsTests.cs @@ -80,6 +80,7 @@ public class MetricsTests // Now create metrics after listener is started using var metrics = new GraphMetrics(); +using StellaOps.TestKit; var repo = new InMemoryGraphRepository(new[] { new NodeTile { Id = "gn:acme:component:one", Kind = "component", Tenant = "acme" } diff --git a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/QueryServiceTests.cs b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/QueryServiceTests.cs index 9fb9b2c58..5dab329d9 100644 --- a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/QueryServiceTests.cs +++ b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/QueryServiceTests.cs @@ -92,6 +92,7 @@ public class QueryServiceTests { if (!line.Contains("\"type\":\"node\"")) continue; using var doc = JsonDocument.Parse(line); +using StellaOps.TestKit; var data = doc.RootElement.GetProperty("data"); if (data.TryGetProperty("overlays", out var overlaysElement) && overlaysElement.ValueKind == JsonValueKind.Object) { diff --git a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/SearchServiceTests.cs b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/SearchServiceTests.cs index 030eb0116..cb907182e 100644 --- a/src/Graph/__Tests/StellaOps.Graph.Api.Tests/SearchServiceTests.cs +++ b/src/Graph/__Tests/StellaOps.Graph.Api.Tests/SearchServiceTests.cs @@ -204,6 +204,7 @@ public class SearchServiceTests private static string ExtractNodeId(string nodeJson) { using var doc = JsonDocument.Parse(nodeJson); +using StellaOps.TestKit; return doc.RootElement.GetProperty("data").GetProperty("id").GetString() ?? string.Empty; } diff --git a/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphAnalyticsPipelineTests.cs b/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphAnalyticsPipelineTests.cs index fb36e29ba..ee1e94623 100644 --- a/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphAnalyticsPipelineTests.cs +++ b/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphAnalyticsPipelineTests.cs @@ -18,6 +18,7 @@ public sealed class GraphAnalyticsPipelineTests provider.Enqueue(snapshot); using var metrics = new GraphAnalyticsMetrics(); +using StellaOps.TestKit; var writer = new InMemoryGraphAnalyticsWriter(); var pipeline = new GraphAnalyticsPipeline( new GraphAnalyticsEngine(new GraphAnalyticsOptions()), diff --git a/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphChangeStreamProcessorTests.cs b/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphChangeStreamProcessorTests.cs index 00bd17b0e..4f0126b15 100644 --- a/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphChangeStreamProcessorTests.cs +++ b/src/Graph/__Tests/StellaOps.Graph.Indexer.Tests/GraphChangeStreamProcessorTests.cs @@ -34,6 +34,7 @@ public sealed class GraphChangeStreamProcessorTests var writer = new FlakyWriter(failFirst: true); using var metrics = new GraphBackfillMetrics(); +using StellaOps.TestKit; var options = Options.Create(new GraphChangeStreamOptions { MaxRetryAttempts = 3, diff --git a/src/IssuerDirectory/StellaOps.IssuerDirectory/StellaOps.IssuerDirectory.Core.Tests/IssuerDirectoryClientTests.cs b/src/IssuerDirectory/StellaOps.IssuerDirectory/StellaOps.IssuerDirectory.Core.Tests/IssuerDirectoryClientTests.cs index 545c2ba3c..4c754fba9 100644 --- a/src/IssuerDirectory/StellaOps.IssuerDirectory/StellaOps.IssuerDirectory.Core.Tests/IssuerDirectoryClientTests.cs +++ b/src/IssuerDirectory/StellaOps.IssuerDirectory/StellaOps.IssuerDirectory.Core.Tests/IssuerDirectoryClientTests.cs @@ -93,6 +93,7 @@ public class IssuerDirectoryClientTests reasonValues!.Should().Equal("rollout"); using var document = JsonDocument.Parse(putRequest.Body ?? string.Empty); +using StellaOps.TestKit; var root = document.RootElement; root.GetProperty("weight").GetDecimal().Should().Be(1.5m); root.GetProperty("reason").GetString().Should().Be("rollout"); diff --git a/src/IssuerDirectory/StellaOps.IssuerDirectory/__Tests/StellaOps.IssuerDirectory.Storage.Postgres.Tests/IssuerAuditSinkTests.cs b/src/IssuerDirectory/StellaOps.IssuerDirectory/__Tests/StellaOps.IssuerDirectory.Storage.Postgres.Tests/IssuerAuditSinkTests.cs index 472049985..e1dc75f9d 100644 --- a/src/IssuerDirectory/StellaOps.IssuerDirectory/__Tests/StellaOps.IssuerDirectory.Storage.Postgres.Tests/IssuerAuditSinkTests.cs +++ b/src/IssuerDirectory/StellaOps.IssuerDirectory/__Tests/StellaOps.IssuerDirectory.Storage.Postgres.Tests/IssuerAuditSinkTests.cs @@ -241,6 +241,7 @@ public sealed class IssuerAuditSinkTests : IAsyncLifetime """; await using var command = new NpgsqlCommand(sql, connection); +using StellaOps.TestKit; command.Parameters.AddWithValue("tenantId", Guid.Parse(tenantId)); command.Parameters.AddWithValue("issuerId", Guid.Parse(issuerId)); diff --git a/src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Tests/PackApprovalTemplateTests.cs b/src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Tests/PackApprovalTemplateTests.cs index aedd3490c..7bfde2a76 100644 --- a/src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Tests/PackApprovalTemplateTests.cs +++ b/src/Notifier/StellaOps.Notifier/StellaOps.Notifier.Tests/PackApprovalTemplateTests.cs @@ -56,6 +56,7 @@ public sealed class PackApprovalTemplateTests var path = LocatePackApprovalTemplatesPath(); var json = File.ReadAllText(path); using var doc = JsonDocument.Parse(json); +using StellaOps.TestKit; return doc.RootElement.Clone(); } diff --git a/src/Notify/__Tests/StellaOps.Notify.Connectors.Slack.Tests/SlackChannelTestProviderTests.cs b/src/Notify/__Tests/StellaOps.Notify.Connectors.Slack.Tests/SlackChannelTestProviderTests.cs index bfe3557c7..fcd4ed1b3 100644 --- a/src/Notify/__Tests/StellaOps.Notify.Connectors.Slack.Tests/SlackChannelTestProviderTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.Connectors.Slack.Tests/SlackChannelTestProviderTests.cs @@ -110,6 +110,7 @@ public sealed class SlackChannelTestProviderTests private static string ComputeSecretHash(string secretRef) { using var sha = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var bytes = System.Text.Encoding.UTF8.GetBytes(secretRef.Trim()); var hash = sha.ComputeHash(bytes); return System.Convert.ToHexString(hash, 0, 8).ToLowerInvariant(); diff --git a/src/Notify/__Tests/StellaOps.Notify.Connectors.Teams.Tests/TeamsChannelTestProviderTests.cs b/src/Notify/__Tests/StellaOps.Notify.Connectors.Teams.Tests/TeamsChannelTestProviderTests.cs index f32d508c8..e6ac429ff 100644 --- a/src/Notify/__Tests/StellaOps.Notify.Connectors.Teams.Tests/TeamsChannelTestProviderTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.Connectors.Teams.Tests/TeamsChannelTestProviderTests.cs @@ -66,6 +66,7 @@ public sealed class TeamsChannelTestProviderTests Assert.Equal(channel.Config.Endpoint, result.Metadata["teams.config.endpoint"]); using var payload = JsonDocument.Parse(result.Preview.Body); +using StellaOps.TestKit; Assert.Equal("message", payload.RootElement.GetProperty("type").GetString()); Assert.Equal(result.Preview.TextBody, payload.RootElement.GetProperty("text").GetString()); Assert.Equal(result.Preview.Summary, payload.RootElement.GetProperty("summary").GetString()); diff --git a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyDeliveryQueueTests.cs b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyDeliveryQueueTests.cs index 50866847f..0d2046ca4 100644 --- a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyDeliveryQueueTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyDeliveryQueueTests.cs @@ -144,6 +144,7 @@ public sealed class NatsNotifyDeliveryQueueTests : IAsyncLifetime await Task.Delay(200); await using var connection = new NatsConnection(new NatsOpts { Url = options.Nats.Url! }); +using StellaOps.TestKit; await connection.ConnectAsync(); var js = new NatsJSContext(connection); diff --git a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyEventQueueTests.cs b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyEventQueueTests.cs index 9e43c19f2..951ce9782 100644 --- a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyEventQueueTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/NatsNotifyEventQueueTests.cs @@ -156,6 +156,7 @@ public sealed class NatsNotifyEventQueueTests : IAsyncLifetime var options = CreateOptions(); await using var queue = CreateQueue(options); +using StellaOps.TestKit; var notifyEvent = TestData.CreateEvent(); await queue.PublishAsync(new NotifyQueueEventMessage(notifyEvent, options.Nats.Subject)); diff --git a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyDeliveryQueueTests.cs b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyDeliveryQueueTests.cs index 8ebf97598..1087beb0e 100644 --- a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyDeliveryQueueTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyDeliveryQueueTests.cs @@ -124,6 +124,7 @@ public sealed class RedisNotifyDeliveryQueueTests : IAsyncLifetime await using var queue = CreateQueue(options); +using StellaOps.TestKit; await queue.PublishAsync(new NotifyDeliveryQueueMessage( TestData.CreateDelivery(), channelId: "channel-dead", diff --git a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyEventQueueTests.cs b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyEventQueueTests.cs index 17f4533df..7c200c919 100644 --- a/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyEventQueueTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.Queue.Tests/RedisNotifyEventQueueTests.cs @@ -152,6 +152,7 @@ public sealed class RedisNotifyEventQueueTests : IAsyncLifetime var options = CreateOptions(); await using var queue = CreateQueue(options); +using StellaOps.TestKit; var notifyEvent = TestData.CreateEvent(); await queue.PublishAsync(new NotifyQueueEventMessage(notifyEvent, options.Redis.Streams[0].Stream)); diff --git a/src/Notify/__Tests/StellaOps.Notify.WebService.Tests/CrudEndpointsTests.cs b/src/Notify/__Tests/StellaOps.Notify.WebService.Tests/CrudEndpointsTests.cs index cefedbf3f..a893236b6 100644 --- a/src/Notify/__Tests/StellaOps.Notify.WebService.Tests/CrudEndpointsTests.cs +++ b/src/Notify/__Tests/StellaOps.Notify.WebService.Tests/CrudEndpointsTests.cs @@ -298,6 +298,7 @@ public sealed class CrudEndpointsTests : IClassFixture { services.AddSingleton(); +using StellaOps.TestKit; }); }); diff --git a/src/Orchestrator/StellaOps.Orchestrator/StellaOps.Orchestrator.Tests/SchemaSmokeTests.cs b/src/Orchestrator/StellaOps.Orchestrator/StellaOps.Orchestrator.Tests/SchemaSmokeTests.cs index ab2e3898d..f16eaf036 100644 --- a/src/Orchestrator/StellaOps.Orchestrator/StellaOps.Orchestrator.Tests/SchemaSmokeTests.cs +++ b/src/Orchestrator/StellaOps.Orchestrator/StellaOps.Orchestrator.Tests/SchemaSmokeTests.cs @@ -32,6 +32,7 @@ public class SchemaSmokeTests var text = File.ReadAllText(path); using var doc = JsonDocument.Parse(text); +using StellaOps.TestKit; Assert.True(doc.RootElement.TryGetProperty("$id", out _)); Assert.True(doc.RootElement.TryGetProperty("title", out _)); } diff --git a/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/ExportServiceTests.cs b/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/ExportServiceTests.cs index be74bbfa9..a9b04f415 100644 --- a/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/ExportServiceTests.cs +++ b/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/ExportServiceTests.cs @@ -34,6 +34,7 @@ public sealed class ExportServiceTests var archiveStream = await exportService.ExportOfflineSeedAsync(record.TenantId, includeContent: true, includeProvenance: true, cancellationToken: ct); using var archive = new ZipArchive(archiveStream, ZipArchiveMode.Read); +using StellaOps.TestKit; Assert.NotNull(archive.GetEntry("packs.ndjson")); Assert.NotNull(archive.GetEntry("parity.ndjson")); Assert.NotNull(archive.GetEntry("lifecycle.ndjson")); diff --git a/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/PacksApiTests.cs b/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/PacksApiTests.cs index d1c2a1c12..4dda27655 100644 --- a/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/PacksApiTests.cs +++ b/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/PacksApiTests.cs @@ -124,6 +124,7 @@ public sealed class PacksApiTests : IClassFixture Assert.Equal(HttpStatusCode.OK, offlineSeed.StatusCode); var bytesZip = await offlineSeed.Content.ReadAsByteArrayAsync(ct); using var archive = new ZipArchive(new MemoryStream(bytesZip)); +using StellaOps.TestKit; Assert.NotNull(archive.GetEntry("packs.ndjson")); Assert.NotNull(archive.GetEntry($"content/{created.PackId}.bin")); } diff --git a/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/RsaSignatureVerifierTests.cs b/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/RsaSignatureVerifierTests.cs index 02b3b2523..522d955c8 100644 --- a/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/RsaSignatureVerifierTests.cs +++ b/src/PacksRegistry/StellaOps.PacksRegistry/StellaOps.PacksRegistry.Tests/RsaSignatureVerifierTests.cs @@ -31,6 +31,7 @@ public sealed class RsaSignatureVerifierTests { var ct = TestContext.Current.CancellationToken; using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var publicPem = ExportPublicPem(rsa); const string digest = "sha256:deadbeef"; var sig = Convert.ToBase64String(Encoding.UTF8.GetBytes("bogus")); diff --git a/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/GatewayActivationTests.cs b/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/GatewayActivationTests.cs index e36130d4c..69283c171 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/GatewayActivationTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/GatewayActivationTests.cs @@ -360,6 +360,7 @@ public sealed class GatewayActivationTests using var client = factory.CreateClient(); +using StellaOps.TestKit; try { var response = await client.PostAsJsonAsync( diff --git a/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyEngineClientTests.cs b/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyEngineClientTests.cs index 09a256869..1040a05c1 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyEngineClientTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyEngineClientTests.cs @@ -70,6 +70,7 @@ public class PolicyEngineClientTests { using var metrics = new PolicyGatewayMetrics(); using var listener = new MeterListener(); +using StellaOps.TestKit; var measurements = new List<(long Value, string Outcome, string Source)>(); var latencies = new List<(double Value, string Outcome, string Source)>(); diff --git a/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyGatewayDpopProofGeneratorTests.cs b/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyGatewayDpopProofGeneratorTests.cs index ace926657..a764db831 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyGatewayDpopProofGeneratorTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Gateway.Tests/PolicyGatewayDpopProofGeneratorTests.cs @@ -125,6 +125,7 @@ public sealed class PolicyGatewayDpopProofGeneratorTests private static string CreateEcKey(DirectoryInfo directory, ECCurve curve) { using var ecdsa = ECDsa.Create(curve); +using StellaOps.TestKit; var privateKey = ecdsa.ExportPkcs8PrivateKey(); var pem = PemEncoding.Write("PRIVATE KEY", privateKey); var path = Path.Combine(directory.FullName, "policy-gateway-dpop.pem"); diff --git a/src/Policy/__Tests/StellaOps.Policy.RiskProfile.Tests/RiskProfileCanonicalizerTests.cs b/src/Policy/__Tests/StellaOps.Policy.RiskProfile.Tests/RiskProfileCanonicalizerTests.cs index f8db15e3c..1a931280f 100644 --- a/src/Policy/__Tests/StellaOps.Policy.RiskProfile.Tests/RiskProfileCanonicalizerTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.RiskProfile.Tests/RiskProfileCanonicalizerTests.cs @@ -73,6 +73,7 @@ public class RiskProfileCanonicalizerTests var merged = RiskProfileCanonicalizer.Merge(baseProfile, overlay); using var doc = JsonDocument.Parse(merged); +using StellaOps.TestKit; var root = doc.RootElement; Assert.Equal(2, root.GetProperty("signals").GetArrayLength()); diff --git a/src/Policy/__Tests/StellaOps.Policy.Scoring.Tests/CvssPolicyLoaderTests.cs b/src/Policy/__Tests/StellaOps.Policy.Scoring.Tests/CvssPolicyLoaderTests.cs index 2a01d4238..ec957ad56 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Scoring.Tests/CvssPolicyLoaderTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Scoring.Tests/CvssPolicyLoaderTests.cs @@ -80,6 +80,7 @@ public sealed class CvssPolicyLoaderTests stream.Seek(0, SeekOrigin.Begin); using var finalDoc = JsonDocument.Parse(stream); +using StellaOps.TestKit; return finalDoc.RootElement.Clone(); } } diff --git a/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/PostgresExceptionApplicationRepositoryTests.cs b/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/PostgresExceptionApplicationRepositoryTests.cs index 7069598f4..c247a9f22 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/PostgresExceptionApplicationRepositoryTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/PostgresExceptionApplicationRepositoryTests.cs @@ -42,6 +42,7 @@ public sealed class PostgresExceptionApplicationRepositoryTests : IAsyncLifetime // Set search path to include the test schema await using var conn = await _dataSource.OpenConnectionAsync(); +using StellaOps.TestKit; await using var cmd = new NpgsqlCommand($"SET search_path TO {_fixture.SchemaName}, public;", conn); await cmd.ExecuteNonQueryAsync(); } diff --git a/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/RecheckEvidenceMigrationTests.cs b/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/RecheckEvidenceMigrationTests.cs index 9ecaebef8..f2d0448c6 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/RecheckEvidenceMigrationTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/RecheckEvidenceMigrationTests.cs @@ -42,6 +42,7 @@ public sealed class RecheckEvidenceMigrationTests : IAsyncLifetime private static async Task AssertTableExistsAsync(NpgsqlConnection connection, string tableName) { await using var command = new NpgsqlCommand("SELECT to_regclass(@name)", connection); +using StellaOps.TestKit; command.Parameters.AddWithValue("name", tableName); var result = await command.ExecuteScalarAsync(); result.Should().NotBeNull($"{tableName} should exist after migrations"); diff --git a/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/UnknownsRepositoryTests.cs b/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/UnknownsRepositoryTests.cs index b2d9a1800..6711f7bfe 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/UnknownsRepositoryTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Storage.Postgres.Tests/UnknownsRepositoryTests.cs @@ -64,6 +64,7 @@ public sealed class UnknownsRepositoryTests : IAsyncLifetime public async Task UpdateAsync_PersistsReasonCodeAndAssumptions() { await using var connection = await _dataSource.OpenConnectionAsync(_tenantId.ToString()); +using StellaOps.TestKit; var repository = new UnknownsRepository(connection); var now = new DateTimeOffset(2025, 2, 3, 4, 5, 6, TimeSpan.Zero); diff --git a/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyBinderTests.cs b/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyBinderTests.cs index 5a73d90b9..3593a86eb 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyBinderTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyBinderTests.cs @@ -141,6 +141,7 @@ public sealed class PolicyBinderTests { using var output = new StringWriter(); using var error = new StringWriter(); +using StellaOps.TestKit; var cli = new PolicyValidationCli(output, error); var options = new PolicyValidationCliOptions { diff --git a/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyScoringConfigTests.cs b/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyScoringConfigTests.cs index cd4d44373..ebfc4a46a 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyScoringConfigTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyScoringConfigTests.cs @@ -60,6 +60,7 @@ public sealed class PolicyScoringConfigTests using var stream = assembly.GetManifestResourceStream("StellaOps.Policy.Schemas.policy-scoring-default.json") ?? throw new InvalidOperationException("Unable to locate embedded scoring default resource."); using var reader = new StreamReader(stream); +using StellaOps.TestKit; var json = reader.ReadToEnd(); var binding = PolicyScoringConfigBinder.Bind(json, PolicyDocumentFormat.Json); diff --git a/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyValidationCliTests.cs b/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyValidationCliTests.cs index fb4bd58d5..e517b80a5 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyValidationCliTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Tests/PolicyValidationCliTests.cs @@ -44,6 +44,7 @@ public class PolicyValidationCliTests using var output = new StringWriter(); using var error = new StringWriter(); +using StellaOps.TestKit; var cli = new PolicyValidationCli(output, error); var exit = await cli.RunAsync(options); diff --git a/src/Policy/__Tests/StellaOps.Policy.Tests/SplLayeringEngineTests.cs b/src/Policy/__Tests/StellaOps.Policy.Tests/SplLayeringEngineTests.cs index 0b42c0157..dc0b89fe8 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Tests/SplLayeringEngineTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Tests/SplLayeringEngineTests.cs @@ -61,6 +61,7 @@ public class SplLayeringEngineTests var merged = SplLayeringEngine.Merge(baseDoc, overlay); using var doc = JsonDocument.Parse(merged); +using StellaOps.TestKit; var root = doc.RootElement; Assert.True(root.TryGetProperty("extras", out var extras) && extras.TryGetProperty("foo", out var foo) && foo.GetInt32() == 1); diff --git a/src/Policy/__Tests/StellaOps.Policy.Tests/SplSchemaResourceTests.cs b/src/Policy/__Tests/StellaOps.Policy.Tests/SplSchemaResourceTests.cs index 31cf0f749..79afb8075 100644 --- a/src/Policy/__Tests/StellaOps.Policy.Tests/SplSchemaResourceTests.cs +++ b/src/Policy/__Tests/StellaOps.Policy.Tests/SplSchemaResourceTests.cs @@ -14,6 +14,7 @@ public class SplSchemaResourceTests { var schema = SplSchemaResource.GetSchema(); using var doc = JsonDocument.Parse(schema); +using StellaOps.TestKit; var match = doc.RootElement .GetProperty("properties") .GetProperty("spec") diff --git a/src/Registry/__Tests/StellaOps.Registry.TokenService.Tests/RegistryTokenIssuerTests.cs b/src/Registry/__Tests/StellaOps.Registry.TokenService.Tests/RegistryTokenIssuerTests.cs index 3773f9b3c..7496c4c25 100644 --- a/src/Registry/__Tests/StellaOps.Registry.TokenService.Tests/RegistryTokenIssuerTests.cs +++ b/src/Registry/__Tests/StellaOps.Registry.TokenService.Tests/RegistryTokenIssuerTests.cs @@ -85,6 +85,7 @@ public sealed class RegistryTokenIssuerTests : IDisposable private string CreatePemKey() { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var builder = new StringWriter(); builder.WriteLine("-----BEGIN PRIVATE KEY-----"); builder.WriteLine(Convert.ToBase64String(rsa.ExportPkcs8PrivateKey(), Base64FormattingOptions.InsertLineBreaks)); diff --git a/src/SbomService/StellaOps.SbomService.Tests/SbomLedgerEndpointsTests.cs b/src/SbomService/StellaOps.SbomService.Tests/SbomLedgerEndpointsTests.cs index 574e7120e..1aaa11d7a 100644 --- a/src/SbomService/StellaOps.SbomService.Tests/SbomLedgerEndpointsTests.cs +++ b/src/SbomService/StellaOps.SbomService.Tests/SbomLedgerEndpointsTests.cs @@ -93,6 +93,7 @@ public sealed class SbomLedgerEndpointsTests : IClassFixture diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Advisory.Tests/AdvisoryClientTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Advisory.Tests/AdvisoryClientTests.cs index de4a30b22..ea9278888 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Advisory.Tests/AdvisoryClientTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Advisory.Tests/AdvisoryClientTests.cs @@ -74,6 +74,7 @@ public sealed class AdvisoryClientTests }); using var temp = new TempFile(); +using StellaOps.TestKit; var bundle = new { items = new[] diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Ruby.Tests/RubyLanguageAnalyzerTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Ruby.Tests/RubyLanguageAnalyzerTests.cs index d871ce023..550aac5e2 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Ruby.Tests/RubyLanguageAnalyzerTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Ruby.Tests/RubyLanguageAnalyzerTests.cs @@ -183,6 +183,7 @@ public sealed class RubyLanguageAnalyzerTests Assert.True(store.TryGet(ScanAnalysisKeys.RubyObservationPayload, out AnalyzerObservationPayload payload)); using var document = JsonDocument.Parse(payload.Content.ToArray()); +using StellaOps.TestKit; var root = document.RootElement; var environment = root.GetProperty("environment"); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/ElfDynamicSectionParserTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/ElfDynamicSectionParserTests.cs index d361dfbef..9ecd3b345 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/ElfDynamicSectionParserTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/ElfDynamicSectionParserTests.cs @@ -113,6 +113,7 @@ public class ElfDynamicSectionParserTests : NativeTestBase buffer[1] = (byte)'Z'; using var stream = new MemoryStream(buffer); +using StellaOps.TestKit; var result = ElfDynamicSectionParser.TryParse(stream, out var info); result.Should().BeFalse(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/HeuristicScannerTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/HeuristicScannerTests.cs index aa96accb5..b7c7a36ed 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/HeuristicScannerTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/HeuristicScannerTests.cs @@ -277,6 +277,7 @@ public class HeuristicScannerTests // Act using var stream = new MemoryStream(data); +using StellaOps.TestKit; var result = HeuristicScanner.Scan(stream, NativeFormat.Elf); // Assert diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/MachOReaderTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/MachOReaderTests.cs index 0c3a15651..29359870b 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/MachOReaderTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/MachOReaderTests.cs @@ -747,6 +747,7 @@ public sealed class MachOReaderTests { var data = BuildMachO64(); using var stream = new MemoryStream(data); +using StellaOps.TestKit; var result = MachOReader.Parse(stream, "/usr/bin/myapp", "sha256:abc123"); Assert.NotNull(result); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeFormatDetectorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeFormatDetectorTests.cs index bc4227266..7c2451fb0 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeFormatDetectorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeFormatDetectorTests.cs @@ -175,6 +175,7 @@ public class NativeFormatDetectorTests var bytes = new byte[] { 0x00, 0x01, 0x02, 0x03 }; using var stream = new MemoryStream(bytes); +using StellaOps.TestKit; var detected = NativeFormatDetector.TryDetect(stream, out var id); Assert.False(detected); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeObservationTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeObservationTests.cs index 1b15cb9df..e2ca10dcf 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeObservationTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/NativeObservationTests.cs @@ -134,6 +134,7 @@ public class NativeObservationSerializerTests var json = NativeObservationSerializer.Serialize(original); using var stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(json)); +using StellaOps.TestKit; // Act var doc = await NativeObservationSerializer.ReadAsync(stream); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PeReaderTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PeReaderTests.cs index 9d26da974..eb10e17ca 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PeReaderTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PeReaderTests.cs @@ -145,6 +145,7 @@ public class PeReaderTests : NativeTestBase var invalidData = new byte[] { 0x00, 0x01, 0x02, 0x03 }; using var stream = new MemoryStream(invalidData); +using StellaOps.TestKit; // Act var result = PeReader.Parse(stream, "invalid.exe"); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PluginPackagingTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PluginPackagingTests.cs index 3d70071dc..594347b52 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PluginPackagingTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Native.Tests/PluginPackagingTests.cs @@ -330,6 +330,7 @@ public sealed class PluginPackagingTests var elfHeader = CreateMinimalElfHeader(); using var stream = new MemoryStream(elfHeader); +using StellaOps.TestKit; var result = await analyzer.AnalyzeAsync("/test/binary.so", stream, options); result.Should().NotBeNull(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Homebrew.Tests/HomebrewReceiptParserTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Homebrew.Tests/HomebrewReceiptParserTests.cs index d55273974..634b2dbcb 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Homebrew.Tests/HomebrewReceiptParserTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Homebrew.Tests/HomebrewReceiptParserTests.cs @@ -272,6 +272,7 @@ public sealed class HomebrewReceiptParserTests """; using var stream = new MemoryStream(Encoding.UTF8.GetBytes(json)); +using StellaOps.TestKit; // Act var receipt = _parser.Parse(stream); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Tests/OsAnalyzerDeterminismTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Tests/OsAnalyzerDeterminismTests.cs index 80ee1de46..1325870b5 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Tests/OsAnalyzerDeterminismTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Tests/OsAnalyzerDeterminismTests.cs @@ -36,6 +36,7 @@ public sealed class OsAnalyzerDeterminismTests public async Task DpkgAnalyzerMatchesGolden() { using var fixture = FixtureManager.UseFixture("dpkg", out var rootPath); +using StellaOps.TestKit; var analyzer = new DpkgPackageAnalyzer(NullLogger.Instance); var context = CreateContext(rootPath); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Windows.Chocolatey.Tests/ChocolateyPackageAnalyzerTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Windows.Chocolatey.Tests/ChocolateyPackageAnalyzerTests.cs index 647e73e72..7aa9aa66e 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Windows.Chocolatey.Tests/ChocolateyPackageAnalyzerTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Analyzers.OS.Windows.Chocolatey.Tests/ChocolateyPackageAnalyzerTests.cs @@ -468,6 +468,7 @@ public class ChocolateyPackageAnalyzerTests CreateNuspecFile(packageDir, "git", "2.42.0", "Git", "Author", "Git"); using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; cts.Cancel(); try diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Cache.Tests/LayerCacheRoundTripTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Cache.Tests/LayerCacheRoundTripTests.cs index 0e238abfc..cb306a598 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Cache.Tests/LayerCacheRoundTripTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Cache.Tests/LayerCacheRoundTripTests.cs @@ -112,6 +112,7 @@ public sealed class LayerCacheRoundTripTests : IAsyncLifetime // Compaction removes CAS entry once over threshold. // Force compaction by writing a large entry. using var largeStream = CreateStream(new string('x', 400_000)); +using StellaOps.TestKit; var largeHash = "sha256:" + new string('e', 64); await _fileCas.PutAsync(new FileCasPutRequest(largeHash, largeStream), CancellationToken.None); _timeProvider.Advance(TimeSpan.FromMinutes(1)); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/DotNetCallGraphExtractorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/DotNetCallGraphExtractorTests.cs index b8e735785..344b90e61 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/DotNetCallGraphExtractorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/DotNetCallGraphExtractorTests.cs @@ -80,6 +80,7 @@ public class DotNetCallGraphExtractorTests { await using var temp = await TempDirectory.CreateAsync(); +using StellaOps.TestKit; var csprojPath = Path.Combine(temp.Path, "App.csproj"); await File.WriteAllTextAsync(csprojPath, """ diff --git a/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaCallGraphExtractorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaCallGraphExtractorTests.cs index 4060985a4..5a7652009 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaCallGraphExtractorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaCallGraphExtractorTests.cs @@ -531,6 +531,7 @@ public class JavaCallGraphExtractorTests // Arrange: Create a temp directory await using var temp = await TempDirectory.CreateAsync(); +using StellaOps.TestKit; var request1 = new CallGraphExtractionRequest( ScanId: "scan-a", Language: "java", diff --git a/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaScriptCallGraphExtractorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaScriptCallGraphExtractorTests.cs index d5e9808e4..ef421cb44 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaScriptCallGraphExtractorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.CallGraph.Tests/JavaScriptCallGraphExtractorTests.cs @@ -484,6 +484,7 @@ public sealed class JavaScriptCallGraphExtractorTests : IAsyncLifetime { await using var temp = await TempDirectory.CreateAsync(); +using StellaOps.TestKit; var packageJson = """ { "name": "test-app", diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityGraphBuilderUnionTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityGraphBuilderUnionTests.cs index 90a87b971..ce3decb8c 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityGraphBuilderUnionTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityGraphBuilderUnionTests.cs @@ -21,6 +21,7 @@ public class ReachabilityGraphBuilderUnionTests var writer = new ReachabilityUnionWriter(); using var temp = new TempDir(); +using StellaOps.TestKit; var result = await writer.WriteAsync(graph, temp.Path, "analysis-graph-1"); Assert.Equal(2, result.Nodes.RecordCount); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityUnionPublisherTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityUnionPublisherTests.cs index 52866cc7a..0aa8ec01e 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityUnionPublisherTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Core.Tests/ReachabilityUnionPublisherTests.cs @@ -20,6 +20,7 @@ public class ReachabilityUnionPublisherTests var cas = new FakeFileContentAddressableStore(); using var temp = new TempDir(); +using StellaOps.TestKit; var publisher = new ReachabilityUnionPublisher(new ReachabilityUnionWriter()); var result = await publisher.PublishAsync(graph, cas, temp.Path, "analysis-pub-1"); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Diff.Tests/ComponentDifferTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Diff.Tests/ComponentDifferTests.cs index 75f03edec..b60ddbaee 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Diff.Tests/ComponentDifferTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Diff.Tests/ComponentDifferTests.cs @@ -339,6 +339,7 @@ public sealed class ComponentDifferTests var json = DiffJsonSerializer.Serialize(document); using var parsed = JsonDocument.Parse(json); +using StellaOps.TestKit; var changeJson = parsed.RootElement .GetProperty("layers")[0] .GetProperty("changes")[0]; diff --git a/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceAnalyzerTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceAnalyzerTests.cs index bd0a3851c..ea12a8e9e 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceAnalyzerTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceAnalyzerTests.cs @@ -830,6 +830,7 @@ public sealed class EntryTraceAnalyzerTests { var manifest = archive.CreateEntry("META-INF/MANIFEST.MF"); using var writer = new StreamWriter(manifest.Open(), Encoding.UTF8); +using StellaOps.TestKit; writer.WriteLine("Manifest-Version: 1.0"); writer.WriteLine($"Main-Class: {mainClass}"); writer.Flush(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceNdjsonWriterTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceNdjsonWriterTests.cs index ce474cedb..8ec35b91a 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceNdjsonWriterTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/EntryTraceNdjsonWriterTests.cs @@ -151,6 +151,7 @@ public sealed class EntryTraceNdjsonWriterTests Assert.EndsWith("\n", ndjsonLine, StringComparison.Ordinal); var json = ndjsonLine.TrimEnd('\n'); using var document = JsonDocument.Parse(json); +using StellaOps.TestKit; return document.RootElement.Clone(); } } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/LayeredRootFileSystemTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/LayeredRootFileSystemTests.cs index 1942a5e92..f8aaf6a2f 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/LayeredRootFileSystemTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.EntryTrace.Tests/LayeredRootFileSystemTests.cs @@ -191,6 +191,7 @@ public sealed class LayeredRootFileSystemTests : IDisposable { using var stream = File.Create(path); using var writer = new TarWriter(stream, leaveOpen: false); +using StellaOps.TestKit; writerAction(writer); } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Integration.Tests/PoEPipelineTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Integration.Tests/PoEPipelineTests.cs index b90138d83..47a9b69c6 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Integration.Tests/PoEPipelineTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Integration.Tests/PoEPipelineTests.cs @@ -207,6 +207,7 @@ public class PoEPipelineTests : IDisposable { // Using SHA256 as BLAKE3 placeholder using var sha = SHA256.Create(); +using StellaOps.TestKit; var hashBytes = sha.ComputeHash(data); var hashHex = Convert.ToHexString(hashBytes).ToLowerInvariant(); return $"blake3:{hashHex}"; diff --git a/src/Scanner/__Tests/StellaOps.Scanner.ProofSpine.Tests/PostgresProofSpineRepositoryTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.ProofSpine.Tests/PostgresProofSpineRepositoryTests.cs index 3bf69fe54..2d5600c74 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.ProofSpine.Tests/PostgresProofSpineRepositoryTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.ProofSpine.Tests/PostgresProofSpineRepositoryTests.cs @@ -40,6 +40,7 @@ public sealed class PostgresProofSpineRepositoryTests }; await using var dataSource = new ScannerDataSource(Options.Create(options), NullLogger.Instance); +using StellaOps.TestKit; var repository = new PostgresProofSpineRepository( dataSource, NullLogger.Instance, diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/AttestingRichGraphWriterTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/AttestingRichGraphWriterTests.cs index 79c5286e8..8a2b0ac9b 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/AttestingRichGraphWriterTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/AttestingRichGraphWriterTests.cs @@ -275,6 +275,7 @@ public class AttestingRichGraphWriterTests : IAsyncLifetime public async ValueTask 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()); } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/BinaryReachabilityLifterTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/BinaryReachabilityLifterTests.cs index 8d8ea1643..06c5aad59 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/BinaryReachabilityLifterTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/BinaryReachabilityLifterTests.cs @@ -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(StringComparer.Ordinal); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionPublisherTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionPublisherTests.cs index 49a084527..5d306afc8 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionPublisherTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionPublisherTests.cs @@ -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()); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionWriterTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionWriterTests.cs index 4c1cc2bd5..477cc2ea5 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionWriterTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/ReachabilityUnionWriterTests.cs @@ -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[] { diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphPublisherTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphPublisherTests.cs index f98787424..c749f93bf 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphPublisherTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphPublisherTests.cs @@ -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()); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphWriterTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphWriterTests.cs index 1548495b8..c9a35da96 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphWriterTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Reachability.Tests/RichGraphWriterTests.cs @@ -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[] { diff --git a/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/PredicateGoldenFixtureTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/PredicateGoldenFixtureTests.cs index 144b12176..bc34749bb 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/PredicateGoldenFixtureTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/PredicateGoldenFixtureTests.cs @@ -79,6 +79,7 @@ public sealed class PredicateGoldenFixtureTests }); using var parsed = JsonDocument.Parse(json); +using StellaOps.TestKit; Assert.Equal("reachability_flip", parsed.RootElement.GetProperty("changeType").GetString()); } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/ReachabilityGateTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/ReachabilityGateTests.cs index 5c0a46521..5173fa8ea 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/ReachabilityGateTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.SmartDiff.Tests/ReachabilityGateTests.cs @@ -50,6 +50,7 @@ public sealed class ReachabilityGateTests var json = JsonSerializer.Serialize(gate); using var parsed = JsonDocument.Parse(json); +using StellaOps.TestKit; var root = parsed.RootElement; Assert.True(root.TryGetProperty("reachable", out _)); Assert.True(root.TryGetProperty("configActivated", out _)); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/OciArtifactPusherTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/OciArtifactPusherTests.cs index fdb550d55..4379ef62a 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/OciArtifactPusherTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/OciArtifactPusherTests.cs @@ -50,6 +50,7 @@ public sealed class OciArtifactPusherTests Assert.NotNull(handler.ManifestBytes); using var doc = JsonDocument.Parse(handler.ManifestBytes!); +using StellaOps.TestKit; Assert.True(doc.RootElement.TryGetProperty("annotations", out var annotations)); Assert.True(annotations.TryGetProperty("org.opencontainers.image.created", out _)); } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/VerdictOciPublisherTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/VerdictOciPublisherTests.cs index ebb1b2694..e36083cd9 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/VerdictOciPublisherTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Oci.Tests/VerdictOciPublisherTests.cs @@ -279,6 +279,7 @@ public sealed class VerdictOciPublisherTests Assert.NotNull(handler.ManifestBytes); using var doc = JsonDocument.Parse(handler.ManifestBytes!); +using StellaOps.TestKit; Assert.True(doc.RootElement.TryGetProperty("layers", out var layers)); Assert.Equal(1, layers.GetArrayLength()); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/BinaryEvidenceServiceTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/BinaryEvidenceServiceTests.cs index 81954597d..e9ace5eb7 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/BinaryEvidenceServiceTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/BinaryEvidenceServiceTests.cs @@ -180,6 +180,7 @@ public sealed class BinaryEvidenceServiceTests : IAsyncLifetime var table = $"{_schemaName}.scans"; await using var connection = await _dataSource.OpenSystemConnectionAsync().ConfigureAwait(false); +using StellaOps.TestKit; await connection.ExecuteAsync( $"INSERT INTO {table} (scan_id) VALUES (@ScanId)", new { ScanId = scanId }).ConfigureAwait(false); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/EpssRepositoryIntegrationTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/EpssRepositoryIntegrationTests.cs index 05815aced..23d3be271 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/EpssRepositoryIntegrationTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/EpssRepositoryIntegrationTests.cs @@ -80,6 +80,7 @@ public sealed class EpssRepositoryIntegrationTests : IAsyncLifetime Assert.Equal(day2, current["CVE-2024-0001"].ModelDate); await using var connection = await _dataSource.OpenSystemConnectionAsync(); +using StellaOps.TestKit; var changes = (await connection.QueryAsync( """ SELECT cve_id, old_score, new_score, old_percentile, new_percentile, flags diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/StorageDualWriteFixture.cs b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/StorageDualWriteFixture.cs index 8eeef5ad1..83871d18e 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/StorageDualWriteFixture.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Storage.Tests/StorageDualWriteFixture.cs @@ -91,6 +91,7 @@ public sealed class StorageDualWriteFixture await _fixture.TruncateAllTablesAsync(); await using var connection = new Npgsql.NpgsqlConnection(_fixture.ConnectionString); +using StellaOps.TestKit; await connection.OpenAsync(); await using var command = new Npgsql.NpgsqlCommand( "SELECT EXISTS (SELECT FROM information_schema.tables WHERE table_schema = @schema AND table_name = 'artifacts');", diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Surface.FS.Tests/FileSurfaceManifestStoreTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Surface.FS.Tests/FileSurfaceManifestStoreTests.cs index c1dacf92e..e54a4e44b 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Surface.FS.Tests/FileSurfaceManifestStoreTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Surface.FS.Tests/FileSurfaceManifestStoreTests.cs @@ -225,6 +225,7 @@ public sealed class FileSurfaceManifestStoreTests : IAsyncDisposable public async ValueTask ComputeHashAsync(Stream stream, string? algorithmId = null, CancellationToken cancellationToken = default) { await using var buffer = new MemoryStream(); +using StellaOps.TestKit; await stream.CopyToAsync(buffer, cancellationToken).ConfigureAwait(false); return SHA256.HashData(buffer.ToArray()); } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/CasAccessSecretParserTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/CasAccessSecretParserTests.cs index e5dc0e871..7626ca4fb 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/CasAccessSecretParserTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/CasAccessSecretParserTests.cs @@ -58,6 +58,7 @@ public sealed class CasAccessSecretParserTests }; using var handle = SurfaceSecretHandle.FromBytes(Encoding.UTF8.GetBytes(json), metadata); +using StellaOps.TestKit; var secret = SurfaceSecretParser.ParseCasAccessSecret(handle); Assert.Equal("s3", secret.Driver); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/RegistryAccessSecretParserTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/RegistryAccessSecretParserTests.cs index 7664ded59..997829eee 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/RegistryAccessSecretParserTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/RegistryAccessSecretParserTests.cs @@ -103,6 +103,7 @@ public sealed class RegistryAccessSecretParserTests }; using var handle = SurfaceSecretHandle.FromBytes(ReadOnlySpan.Empty, metadata); +using StellaOps.TestKit; var secret = SurfaceSecretParser.ParseRegistryAccessSecret(handle); var entry = Assert.Single(secret.Entries); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/SurfaceSecretsServiceCollectionExtensionsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/SurfaceSecretsServiceCollectionExtensionsTests.cs index e72688ed2..57ffa56fb 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/SurfaceSecretsServiceCollectionExtensionsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Surface.Secrets.Tests/SurfaceSecretsServiceCollectionExtensionsTests.cs @@ -40,6 +40,7 @@ namespace StellaOps.Scanner.Surface.Secrets.Tests services.AddSurfaceSecrets(); await using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var secretProvider = provider.GetRequiredService(); var handle = await secretProvider.GetAsync(new SurfaceSecretRequest("tenant", "component", "registry")); try diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ActionablesEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ActionablesEndpointsTests.cs index 7cd0ab118..79f1bf7b8 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ActionablesEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ActionablesEndpointsTests.cs @@ -128,6 +128,7 @@ public sealed class ActionablesEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var response = await client.GetAsync("/api/v1/actionables/delta/delta-12345678"); var result = await response.Content.ReadFromJsonAsync(SerializerOptions); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/AuthorizationTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/AuthorizationTests.cs index 85c6ba975..d74f24db5 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/AuthorizationTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/AuthorizationTests.cs @@ -21,6 +21,7 @@ public sealed class AuthorizationTests }); using var client = factory.CreateClient(); +using StellaOps.TestKit; var response = await client.GetAsync("/api/v1/__auth-probe"); Assert.Equal(HttpStatusCode.Unauthorized, response.StatusCode); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/BaselineEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/BaselineEndpointsTests.cs index fdc4bdfb0..da965629b 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/BaselineEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/BaselineEndpointsTests.cs @@ -112,6 +112,7 @@ public sealed class BaselineEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var response = await client.GetAsync("/api/v1/baselines/recommendations/sha256:artifact123"); var result = await response.Content.ReadFromJsonAsync(SerializerOptions); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CallGraphEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CallGraphEndpointsTests.cs index e85aa06b0..a73697f77 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CallGraphEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CallGraphEndpointsTests.cs @@ -63,6 +63,7 @@ public sealed class CallGraphEndpointsTests { Content = JsonContent.Create(request) }; +using StellaOps.TestKit; secondRequest.Headers.TryAddWithoutValidation("Content-Digest", "sha256:deadbeef"); var second = await client.SendAsync(secondRequest); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CounterfactualEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CounterfactualEndpointsTests.cs index 053bc8749..eeb1838fd 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CounterfactualEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/CounterfactualEndpointsTests.cs @@ -205,6 +205,7 @@ public sealed class CounterfactualEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var request = new CounterfactualRequestDto { FindingId = "finding-123", diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/DeltaCompareEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/DeltaCompareEndpointsTests.cs index d22eebe6e..ce9c86bd4 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/DeltaCompareEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/DeltaCompareEndpointsTests.cs @@ -130,6 +130,7 @@ public sealed class DeltaCompareEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var request = new DeltaCompareRequestDto { BaseDigest = "sha256:base123", diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/EvidenceCompositionServiceTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/EvidenceCompositionServiceTests.cs index 6326eb5ae..667466da1 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/EvidenceCompositionServiceTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/EvidenceCompositionServiceTests.cs @@ -112,6 +112,7 @@ public sealed class EvidenceEndpointsTests }); using var client = factory.CreateClient(); +using StellaOps.TestKit; var response = await client.GetAsync("/api/v1/scans/nonexistent-scan/evidence"); // Current behavior: returns empty list (200 OK) for non-existent scans diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/FindingsEvidenceControllerTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/FindingsEvidenceControllerTests.cs index f8af62a5b..29e4b5bab 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/FindingsEvidenceControllerTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/FindingsEvidenceControllerTests.cs @@ -123,6 +123,7 @@ public sealed class FindingsEvidenceControllerTests private static async Task SeedFindingAsync(ScannerApplicationFactory factory) { using var scope = factory.Services.CreateScope(); +using StellaOps.TestKit; var db = scope.ServiceProvider.GetRequiredService(); await db.Database.MigrateAsync(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/HealthEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/HealthEndpointsTests.cs index 8d5804548..d7f7919c6 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/HealthEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/HealthEndpointsTests.cs @@ -13,6 +13,7 @@ public sealed class HealthEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var healthResponse = await client.GetAsync("/healthz"); Assert.True(healthResponse.IsSuccessStatusCode, $"Expected 200 from /healthz, received {(int)healthResponse.StatusCode}."); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/IdempotencyMiddlewareTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/IdempotencyMiddlewareTests.cs index d3ad7eb0a..2193ec405 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/IdempotencyMiddlewareTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/IdempotencyMiddlewareTests.cs @@ -128,6 +128,7 @@ public sealed class IdempotencyMiddlewareTests await using var factory = CreateFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var content = new StringContent("""{"test":"nodigest"}""", Encoding.UTF8, "application/json"); // Not adding Content-Digest header - middleware should compute it diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ManifestEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ManifestEndpointsTests.cs index ef67a0576..4c07c9e99 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ManifestEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ManifestEndpointsTests.cs @@ -420,6 +420,7 @@ public sealed class ManifestEndpointsTests // Arrange await using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var scanId = Guid.NewGuid(); // Act - Trailing slash with empty root hash diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/OfflineKitEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/OfflineKitEndpointsTests.cs index a6071ee6e..ebdcbf66a 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/OfflineKitEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/OfflineKitEndpointsTests.cs @@ -239,6 +239,7 @@ public sealed class OfflineKitEndpointsTests private static (string KeyId, string PublicKeyPem, string DsseJson) CreateSignedDsse(byte[] bundleBytes) { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var publicKeyDer = rsa.ExportSubjectPublicKeyInfo(); var fingerprint = ComputeSha256Hex(publicKeyDer); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PlatformEventPublisherRegistrationTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PlatformEventPublisherRegistrationTests.cs index 640cc8b28..47bb91dd0 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PlatformEventPublisherRegistrationTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PlatformEventPublisherRegistrationTests.cs @@ -55,6 +55,7 @@ public sealed class PlatformEventPublisherRegistrationTests }); using var scope = factory.Services.CreateScope(); +using StellaOps.TestKit; var options = scope.ServiceProvider.GetRequiredService>().Value; Assert.True(options.Events.Enabled); Assert.Equal("redis", options.Events.Driver); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PolicyEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PolicyEndpointsTests.cs index 8ee1b130b..ef167b0cc 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PolicyEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/PolicyEndpointsTests.cs @@ -64,6 +64,7 @@ public sealed class PolicyEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; const string policyYaml = """ version: "1.0" rules: diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ProofSpineEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ProofSpineEndpointsTests.cs index 636953ce8..1022ccbdd 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ProofSpineEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ProofSpineEndpointsTests.cs @@ -179,6 +179,7 @@ public sealed class ProofSpineEndpointsTests await using var factory = new ScannerApplicationFactory(); using var scope = factory.Services.CreateScope(); +using StellaOps.TestKit; var builder = scope.ServiceProvider.GetRequiredService(); var repository = scope.ServiceProvider.GetRequiredService(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RateLimitingTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RateLimitingTests.cs index 56719c918..d54ef045f 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RateLimitingTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RateLimitingTests.cs @@ -175,6 +175,7 @@ public sealed class RateLimitingTests // Arrange await using var factory = CreateFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var scanId = Guid.NewGuid(); // Act - Requests from "anonymous" tenant diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReachabilityDriftEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReachabilityDriftEndpointsTests.cs index 0950fb68b..f7eb5956a 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReachabilityDriftEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReachabilityDriftEndpointsTests.cs @@ -87,6 +87,7 @@ public sealed class ReachabilityDriftEndpointsTests private static async Task SeedCallGraphSnapshotsAsync(IServiceProvider services, string baseScanId, string headScanId) { using var scope = services.CreateScope(); +using StellaOps.TestKit; var repo = scope.ServiceProvider.GetRequiredService(); var baseSnapshot = CreateSnapshot( diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportSamplesTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportSamplesTests.cs index c46cd7822..0a2f554ff 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportSamplesTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportSamplesTests.cs @@ -26,6 +26,7 @@ public sealed class ReportSamplesTests var path = Path.Combine(repoRoot, "samples", "api", "reports", "report-sample.dsse.json"); Assert.True(File.Exists(path), $"Sample file not found at {path}."); await using var stream = File.OpenRead(path); +using StellaOps.TestKit; var response = await JsonSerializer.DeserializeAsync(stream, SerializerOptions); Assert.NotNull(response); Assert.NotNull(response!.Report); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportsEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportsEndpointsTests.cs index 6bb8095dc..9bd3fcce5 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportsEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ReportsEndpointsTests.cs @@ -186,6 +186,7 @@ rules: using var client = factory.CreateClient(); +using StellaOps.TestKit; var request = new ReportRequestDto { ImageDigest = "sha256:cafebabe", diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RubyPackagesEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RubyPackagesEndpointsTests.cs index d540a5d20..8cde7e9bb 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RubyPackagesEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RubyPackagesEndpointsTests.cs @@ -270,6 +270,7 @@ public sealed class RubyPackagesEndpointsTests } using var client = factory.CreateClient(); +using StellaOps.TestKit; var encodedDigest = Uri.EscapeDataString(digest); var response = await client.GetAsync($"/api/v1/scans/{encodedDigest}/entrytrace"); Assert.Equal(HttpStatusCode.OK, response.StatusCode); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeEndpointsTests.cs index ce14adc5c..8be16f439 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeEndpointsTests.cs @@ -301,6 +301,7 @@ rules: [] using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var request = new RuntimePolicyRequestDto { Images = Array.Empty() diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeReconciliationTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeReconciliationTests.cs index 0c85049be..4aa9c229d 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeReconciliationTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/RuntimeReconciliationTests.cs @@ -597,6 +597,7 @@ public sealed class RuntimeReconciliationTests public Task PutAsync(ArtifactObjectDescriptor descriptor, Stream content, CancellationToken cancellationToken) { using var ms = new MemoryStream(); +using StellaOps.TestKit; content.CopyTo(ms); _store[$"{descriptor.Bucket}/{descriptor.Key}"] = ms.ToArray(); return Task.CompletedTask; diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomEndpointsTests.cs index 55b2f2f20..2df32961e 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomEndpointsTests.cs @@ -85,6 +85,7 @@ public sealed class SbomEndpointsTests ArgumentNullException.ThrowIfNull(content); using var buffer = new MemoryStream(); +using StellaOps.TestKit; await content.CopyToAsync(buffer, cancellationToken).ConfigureAwait(false); var key = $"{descriptor.Bucket}:{descriptor.Key}"; diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomUploadEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomUploadEndpointsTests.cs index 9f6be5109..1059b32d1 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomUploadEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SbomUploadEndpointsTests.cs @@ -143,6 +143,7 @@ public sealed class SbomUploadEndpointsTests ArgumentNullException.ThrowIfNull(content); using var buffer = new MemoryStream(); +using StellaOps.TestKit; await content.CopyToAsync(buffer, cancellationToken).ConfigureAwait(false); var key = $"{descriptor.Bucket}:{descriptor.Key}"; diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScannerSurfaceSecretConfiguratorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScannerSurfaceSecretConfiguratorTests.cs index 45b861f5f..31f66d706 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScannerSurfaceSecretConfiguratorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScannerSurfaceSecretConfiguratorTests.cs @@ -143,6 +143,7 @@ public sealed class ScannerSurfaceSecretConfiguratorTests """; using var handle = SurfaceSecretHandle.FromBytes(Encoding.UTF8.GetBytes(json)); +using StellaOps.TestKit; var secretProvider = new StubSecretProvider(new Dictionary(StringComparer.OrdinalIgnoreCase) { ["registry"] = handle diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Entropy.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Entropy.cs index 2989119d1..bd16220fe 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Entropy.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Entropy.cs @@ -24,6 +24,7 @@ public sealed partial class ScansEndpointsTests using var client = factory.CreateClient(); +using StellaOps.TestKit; var submitResponse = await client.PostAsJsonAsync("/api/v1/scans", new { image = new { digest = "sha256:image-demo" } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.RecordMode.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.RecordMode.cs index 56149e63f..b30398639 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.RecordMode.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.RecordMode.cs @@ -100,6 +100,7 @@ public sealed partial class ScansEndpointsTests public Task PutAsync(ArtifactObjectDescriptor descriptor, Stream content, CancellationToken cancellationToken) { using var buffer = new MemoryStream(); +using StellaOps.TestKit; content.CopyTo(buffer); Objects[descriptor.Key] = buffer.ToArray(); return Task.CompletedTask; diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Replay.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Replay.cs index 61c0449f8..cd18d626a 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Replay.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.Replay.cs @@ -38,6 +38,7 @@ public sealed partial class ScansEndpointsTests var scanId = submitPayload!.ScanId; using var scope = factory.Services.CreateScope(); +using StellaOps.TestKit; var coordinator = scope.ServiceProvider.GetRequiredService(); var recordMode = scope.ServiceProvider.GetRequiredService(); var timeProvider = scope.ServiceProvider.GetRequiredService(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.cs index bc49888ca..eea879913 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/ScansEndpointsTests.cs @@ -182,6 +182,7 @@ public sealed partial class ScansEndpointsTests }); using var client = factory.CreateClient(); +using StellaOps.TestKit; var response = await client.GetAsync("/api/v1/scans/scan-missing/entrytrace"); Assert.Equal(HttpStatusCode.NotFound, response.StatusCode); } diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SliceEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SliceEndpointsTests.cs index cf87199cf..af1faf92b 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SliceEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/SliceEndpointsTests.cs @@ -477,6 +477,7 @@ public sealed class SliceCacheTests // Arrange var options = Microsoft.Extensions.Options.Options.Create(new SliceCacheOptions { Enabled = false }); using var cache = new SliceCache(options); +using StellaOps.TestKit; var cacheResult = CreateTestCacheResult(); // Act diff --git a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/TriageStatusEndpointsTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/TriageStatusEndpointsTests.cs index 89e70a0d5..4bfb838ca 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/TriageStatusEndpointsTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.WebService.Tests/TriageStatusEndpointsTests.cs @@ -189,6 +189,7 @@ public sealed class TriageStatusEndpointsTests using var factory = new ScannerApplicationFactory(); using var client = factory.CreateClient(); +using StellaOps.TestKit; var request = new BulkTriageQueryRequestDto { Limit = 10 diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/CompositeScanAnalyzerDispatcherTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/CompositeScanAnalyzerDispatcherTests.cs index e89a7cdc0..5b00c4ed7 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/CompositeScanAnalyzerDispatcherTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/CompositeScanAnalyzerDispatcherTests.cs @@ -317,6 +317,7 @@ public sealed class CompositeScanAnalyzerDispatcherTests await using var services = serviceCollection.BuildServiceProvider(); +using StellaOps.TestKit; var scopeFactory = services.GetRequiredService(); var loggerFactory = services.GetRequiredService(); var metrics = services.GetRequiredService(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/HmacDsseEnvelopeSignerTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/HmacDsseEnvelopeSignerTests.cs index 70b64d0bc..a64e9fd81 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/HmacDsseEnvelopeSignerTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/HmacDsseEnvelopeSignerTests.cs @@ -86,6 +86,7 @@ public sealed class HmacDsseEnvelopeSignerTests { var secret = Convert.FromBase64String(base64Secret); using var hmac = new System.Security.Cryptography.HMACSHA256(secret); +using StellaOps.TestKit; var pae = BuildPae(payloadType, payload); var signature = hmac.ComputeHash(pae); return Base64UrlEncode(signature); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/LeaseHeartbeatServiceTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/LeaseHeartbeatServiceTests.cs index 1c526af8e..d4b56a329 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/LeaseHeartbeatServiceTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/LeaseHeartbeatServiceTests.cs @@ -31,6 +31,7 @@ public sealed class LeaseHeartbeatServiceTests var optionsMonitor = new StaticOptionsMonitor(options); using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; var scheduler = new RecordingDelayScheduler(cts); var lease = new TestJobLease(TimeSpan.FromSeconds(90)); var randomProvider = new DeterministicRandomProvider(seed: 1337); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RedisWorkerSmokeTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RedisWorkerSmokeTests.cs index 2e6b14526..de5ee791c 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RedisWorkerSmokeTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RedisWorkerSmokeTests.cs @@ -91,6 +91,7 @@ public sealed class RedisWorkerSmokeTests var hostedService = provider.GetRequiredService(); using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30)); +using StellaOps.TestKit; await hostedService.StartAsync(cts.Token); var smokeObserver = provider.GetRequiredService(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RegistrySecretStageExecutorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RegistrySecretStageExecutorTests.cs index 27b4e5475..0465d4f3d 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RegistrySecretStageExecutorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/RegistrySecretStageExecutorTests.cs @@ -94,6 +94,7 @@ public sealed class RegistrySecretStageExecutorTests var measurements = new List<(long Value, KeyValuePair[] Tags)>(); using var listener = CreateCounterListener("scanner_worker_registry_secret_requests_total", measurements); +using StellaOps.TestKit; await executor.ExecuteAsync(context, CancellationToken.None); listener.RecordObservableInstruments(); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/ScannerStorageSurfaceSecretConfiguratorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/ScannerStorageSurfaceSecretConfiguratorTests.cs index 8dccb857a..d2a7e943f 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/ScannerStorageSurfaceSecretConfiguratorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/ScannerStorageSurfaceSecretConfiguratorTests.cs @@ -34,6 +34,7 @@ public sealed class ScannerStorageSurfaceSecretConfiguratorTests """; using var handle = SurfaceSecretHandle.FromBytes(Encoding.UTF8.GetBytes(json)); +using StellaOps.TestKit; var secretProvider = new StubSecretProvider(handle); var environment = new StubSurfaceEnvironment("tenant-eu"); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/SurfaceManifestStageExecutorTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/SurfaceManifestStageExecutorTests.cs index 535b7a98a..0f9ec543b 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/SurfaceManifestStageExecutorTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/SurfaceManifestStageExecutorTests.cs @@ -526,6 +526,7 @@ public sealed class SurfaceManifestStageExecutorTests var determinismPayload = Assert.Single(publisher.LastRequest!.Payloads, p => p.Kind == "determinism.json"); using var document = JsonDocument.Parse(determinismPayload.Content); +using StellaOps.TestKit; var root = document.RootElement; Assert.True(root.GetProperty("fixedClock").GetBoolean()); diff --git a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/WorkerBasicScanScenarioTests.cs b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/WorkerBasicScanScenarioTests.cs index 1292128b8..950fc9fb1 100644 --- a/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/WorkerBasicScanScenarioTests.cs +++ b/src/Scanner/__Tests/StellaOps.Scanner.Worker.Tests/WorkerBasicScanScenarioTests.cs @@ -67,6 +67,7 @@ public sealed class WorkerBasicScanScenarioTests .AddLogging(builder => { builder.ClearProviders(); +using StellaOps.TestKit; builder.AddProvider(testLoggerProvider); builder.SetMinimumLevel(LogLevel.Debug); }) diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.ImpactIndex.Tests/FixtureImpactIndexTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.ImpactIndex.Tests/FixtureImpactIndexTests.cs index db3c50f0d..ef00817ca 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.ImpactIndex.Tests/FixtureImpactIndexTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.ImpactIndex.Tests/FixtureImpactIndexTests.cs @@ -111,6 +111,7 @@ public sealed class FixtureImpactIndexTests }); using var _ = loggerFactory; +using StellaOps.TestKit; var result = await impactIndex.ResolveAllAsync(selector, usageOnly: false); result.Images.Should().HaveCount(6); diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/SamplePayloadTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/SamplePayloadTests.cs index ff1327ade..40acf9f16 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/SamplePayloadTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/SamplePayloadTests.cs @@ -250,6 +250,7 @@ public sealed class SamplePayloadTests private static string NormalizeJson(string json) { using var document = JsonDocument.Parse(json); +using StellaOps.TestKit; return JsonSerializer.Serialize(document.RootElement, new JsonSerializerOptions { WriteIndented = false diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/ScheduleSerializationTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/ScheduleSerializationTests.cs index 4acb79a3f..0ddfbf1cc 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/ScheduleSerializationTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.Models.Tests/ScheduleSerializationTests.cs @@ -80,6 +80,7 @@ public sealed class ScheduleSerializationTests Assert.Equal(jsonA, jsonB); using var doc = JsonDocument.Parse(jsonA); +using StellaOps.TestKit; var root = doc.RootElement; Assert.Equal(SchedulerSchemaVersions.Schedule, root.GetProperty("schemaVersion").GetString()); Assert.Equal("analysis-only", root.GetProperty("mode").GetString()); diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/RedisSchedulerQueueTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/RedisSchedulerQueueTests.cs index 2aea14573..16b6349e9 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/RedisSchedulerQueueTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/RedisSchedulerQueueTests.cs @@ -210,6 +210,7 @@ public sealed class RedisSchedulerQueueTests : IAsyncLifetime TimeProvider.System, async config => (IConnectionMultiplexer)await ConnectionMultiplexer.ConnectAsync(config).ConfigureAwait(false)); +using StellaOps.TestKit; var message = TestData.CreateRunnerMessage(); await queue.EnqueueAsync(message); diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/SchedulerQueueServiceCollectionExtensionsTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/SchedulerQueueServiceCollectionExtensionsTests.cs index 125166e30..23d5eec94 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/SchedulerQueueServiceCollectionExtensionsTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.Queue.Tests/SchedulerQueueServiceCollectionExtensionsTests.cs @@ -35,6 +35,7 @@ public sealed class SchedulerQueueServiceCollectionExtensionsTests await using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var plannerQueue = provider.GetRequiredService(); var runnerQueue = provider.GetRequiredService(); diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/CartographerWebhookClientTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/CartographerWebhookClientTests.cs index 5711edcc2..a8b07dbbc 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/CartographerWebhookClientTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/CartographerWebhookClientTests.cs @@ -79,6 +79,7 @@ public sealed class CartographerWebhookClientTests var httpClient = new HttpClient(handler); var options = Microsoft.Extensions.Options.Options.Create(new SchedulerCartographerOptions()); using var loggerFactory = LoggerFactory.Create(builder => builder.AddDebug()); +using StellaOps.TestKit; var client = new CartographerWebhookClient(httpClient, new OptionsMonitorStub(options), loggerFactory.CreateLogger()); var job = new GraphOverlayJob( diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/EventWebhookEndpointTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/EventWebhookEndpointTests.cs index d85befc65..5ebbcc648 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/EventWebhookEndpointTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/EventWebhookEndpointTests.cs @@ -127,6 +127,7 @@ public sealed class EventWebhookEndpointTests : IClassFixture= 1); diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/GraphJobEventPublisherTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/GraphJobEventPublisherTests.cs index 7e100fffe..40622ce25 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/GraphJobEventPublisherTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/GraphJobEventPublisherTests.cs @@ -73,6 +73,7 @@ public sealed class GraphJobEventPublisherTests var options = Microsoft.Extensions.Options.Options.Create(new SchedulerEventsOptions()); var loggerProvider = new ListLoggerProvider(); using var loggerFactory = LoggerFactory.Create(builder => builder.AddProvider(loggerProvider)); +using StellaOps.TestKit; var publisher = new GraphJobEventPublisher(new OptionsMonitorStub(options), new ThrowingRedisConnectionFactory(), loggerFactory.CreateLogger()); var overlayJob = new GraphOverlayJob( diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/PolicyRunEndpointTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/PolicyRunEndpointTests.cs index e6fc141c9..ed830146c 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/PolicyRunEndpointTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.WebService.Tests/PolicyRunEndpointTests.cs @@ -66,6 +66,7 @@ public sealed class PolicyRunEndpointTests : IClassFixture PolicyRunTargetingResult.NoWork(job, "empty") diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/PolicySimulationWebhookClientTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/PolicySimulationWebhookClientTests.cs index 2911c1976..d3788e43e 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/PolicySimulationWebhookClientTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/PolicySimulationWebhookClientTests.cs @@ -38,6 +38,7 @@ public sealed class PolicySimulationWebhookClientTests { var handler = new RecordingHandler(new HttpResponseMessage(HttpStatusCode.Accepted)); using var httpClient = new HttpClient(handler); +using StellaOps.TestKit; var options = CreateOptions(o => { o.Policy.Webhook.Enabled = true; diff --git a/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/RunnerExecutionServiceTests.cs b/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/RunnerExecutionServiceTests.cs index 4e55ed743..4bbe95019 100644 --- a/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/RunnerExecutionServiceTests.cs +++ b/src/Scheduler/__Tests/StellaOps.Scheduler.Worker.Tests/RunnerExecutionServiceTests.cs @@ -114,6 +114,7 @@ public sealed class RunnerExecutionServiceTests var eventPublisher = new RecordingSchedulerEventPublisher(); using var metrics = new SchedulerWorkerMetrics(); +using StellaOps.TestKit; var service = new RunnerExecutionService( repository, new RecordingRunSummaryService(), diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/CallgraphIngestionServiceTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/CallgraphIngestionServiceTests.cs index a254947de..5e0e36525 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/CallgraphIngestionServiceTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/CallgraphIngestionServiceTests.cs @@ -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(); } diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/EdgeBundleIngestionServiceTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/EdgeBundleIngestionServiceTests.cs index b7f527d3b..570bfd682 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/EdgeBundleIngestionServiceTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/EdgeBundleIngestionServiceTests.cs @@ -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); diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/ReachabilityUnionIngestionServiceTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/ReachabilityUnionIngestionServiceTests.cs index 690a8b008..fdf451fe4 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/ReachabilityUnionIngestionServiceTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/ReachabilityUnionIngestionServiceTests.cs @@ -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(); } diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/RouterEventsPublisherTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/RouterEventsPublisherTests.cs index 7e61f762b..45fc65008 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/RouterEventsPublisherTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/RouterEventsPublisherTests.cs @@ -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(); var builder = new ReachabilityFactEventBuilder(options, TimeProvider.System); var publisher = new RouterEventsPublisher(builder, options, httpClient, logger); diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/RuntimeFactsBatchIngestionTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/RuntimeFactsBatchIngestionTests.cs index 1473b3707..721e5b440 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/RuntimeFactsBatchIngestionTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/RuntimeFactsBatchIngestionTests.cs @@ -252,6 +252,7 @@ public class RuntimeFactsBatchIngestionTests public async Task SaveAsync(RuntimeFactsArtifactSaveRequest request, Stream content, CancellationToken cancellationToken) { using var ms = new MemoryStream(); +using StellaOps.TestKit; await content.CopyToAsync(ms, cancellationToken); var artifact = new StoredRuntimeFactsArtifact( diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/SimpleJsonCallgraphParserGateTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/SimpleJsonCallgraphParserGateTests.cs index 922df60b2..747df98fc 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/SimpleJsonCallgraphParserGateTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/SimpleJsonCallgraphParserGateTests.cs @@ -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(); diff --git a/src/Signals/__Tests/StellaOps.Signals.Tests/UnknownsDecayServiceTests.cs b/src/Signals/__Tests/StellaOps.Signals.Tests/UnknownsDecayServiceTests.cs index 26c155fbb..591729504 100644 --- a/src/Signals/__Tests/StellaOps.Signals.Tests/UnknownsDecayServiceTests.cs +++ b/src/Signals/__Tests/StellaOps.Signals.Tests/UnknownsDecayServiceTests.cs @@ -310,6 +310,7 @@ public class UnknownsDecayServiceTests } using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; cts.Cancel(); await Assert.ThrowsAsync(() => diff --git a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/BundleIngestionStepExecutorTests.cs b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/BundleIngestionStepExecutorTests.cs index 15c08cad5..6b53ffabe 100644 --- a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/BundleIngestionStepExecutorTests.cs +++ b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/BundleIngestionStepExecutorTests.cs @@ -73,6 +73,7 @@ public sealed class BundleIngestionStepExecutorTests public async Task ExecuteAsync_MissingChecksum_Fails() { using var temp = new TempDirectory(); +using StellaOps.TestKit; var source = Path.Combine(temp.Path, "bundle.tgz"); var ct = TestContext.Current.CancellationToken; await File.WriteAllTextAsync(source, "bundle-data", ct); diff --git a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/FilesystemPackRunArtifactReaderTests.cs b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/FilesystemPackRunArtifactReaderTests.cs index 399133547..2adc24dc2 100644 --- a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/FilesystemPackRunArtifactReaderTests.cs +++ b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/FilesystemPackRunArtifactReaderTests.cs @@ -25,6 +25,7 @@ public sealed class FilesystemPackRunArtifactReaderTests public async Task ListAsync_ParsesManifestAndSortsByName() { using var temp = new TempDir(); +using StellaOps.TestKit; var runId = "run-1"; var manifestPath = Path.Combine(temp.Path, "run-1", "artifact-manifest.json"); Directory.CreateDirectory(Path.GetDirectoryName(manifestPath)!); diff --git a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/PackRunProvenanceWriterTests.cs b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/PackRunProvenanceWriterTests.cs index 20c954d22..75d96e0f6 100644 --- a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/PackRunProvenanceWriterTests.cs +++ b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/PackRunProvenanceWriterTests.cs @@ -30,6 +30,7 @@ public sealed class PackRunProvenanceWriterTests Assert.True(File.Exists(path)); using var document = JsonDocument.Parse(await File.ReadAllTextAsync(path, ct)); +using StellaOps.TestKit; var root = document.RootElement; Assert.Equal("run-test", root.GetProperty("runId").GetString()); Assert.Equal("tenant-alpha", root.GetProperty("tenantId").GetString()); diff --git a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/TaskRunnerClientTests.cs b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/TaskRunnerClientTests.cs index 9334caabf..6ee55491c 100644 --- a/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/TaskRunnerClientTests.cs +++ b/src/TaskRunner/StellaOps.TaskRunner/StellaOps.TaskRunner.Tests/TaskRunnerClientTests.cs @@ -59,6 +59,7 @@ public sealed class TaskRunnerClientTests """; using var stream = new MemoryStream(Encoding.UTF8.GetBytes(ndjson)); +using StellaOps.TestKit; var entries = await StreamingLogReader.CollectAsync(stream, ct); Assert.Equal(2, entries.Count); diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/GoldenSignalMetricsTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/GoldenSignalMetricsTests.cs index ab4fba20d..9043c17cf 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/GoldenSignalMetricsTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/GoldenSignalMetricsTests.cs @@ -179,6 +179,7 @@ public sealed class GoldenSignalMetricsTests : IDisposable }; using var metrics = new GoldenSignalMetrics(options); +using StellaOps.TestKit; for (int i = 0; i < 10; i++) { metrics.IncrementRequests(1, GoldenSignalMetrics.Tag("unique_id", $"id-{i}")); diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/IncidentModeServiceTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/IncidentModeServiceTests.cs index d0e14e05a..3e9289e65 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/IncidentModeServiceTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/IncidentModeServiceTests.cs @@ -480,6 +480,7 @@ public sealed class IncidentModeServiceTests : IDisposable using var service = CreateService(opt => { opt.Enabled = false; +using StellaOps.TestKit; }); var result = await service.ActivateFromConfigAsync(); diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/MetricLabelGuardTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/MetricLabelGuardTests.cs index 3e04ce5ae..1388b9d2c 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/MetricLabelGuardTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/MetricLabelGuardTests.cs @@ -43,6 +43,7 @@ public class MetricLabelGuardTests var guard = new MetricLabelGuard(options); using var meter = new Meter("test"); +using StellaOps.TestKit; var histogram = meter.CreateHistogram("request.duration"); histogram.RecordRequestDuration(guard, 42, "verylongroute", "GET", "200", "ok"); diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/ProofCoverageMetricsTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/ProofCoverageMetricsTests.cs index 1969857e2..d94e84977 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/ProofCoverageMetricsTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/ProofCoverageMetricsTests.cs @@ -25,6 +25,7 @@ public sealed class ProofCoverageMetricsTests { using var metrics = new ProofCoverageMetrics(); +using StellaOps.TestKit; metrics.RecordScanCoverage( tenantId: "tenant-1", surfaceId: "surface-1", diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeFileExporterTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeFileExporterTests.cs index 46b5197fa..05a30c3a3 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeFileExporterTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeFileExporterTests.cs @@ -253,6 +253,7 @@ public sealed class SealedModeFileExporterTests : IDisposable using var exporter = CreateExporter(opt => { opt.MaxBytes = 50; +using StellaOps.TestKit; opt.MaxRotatedFiles = 2; }); exporter.Initialize(); diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeTelemetryServiceTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeTelemetryServiceTests.cs index 626eaab08..b59220374 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeTelemetryServiceTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/SealedModeTelemetryServiceTests.cs @@ -347,6 +347,7 @@ public sealed class SealedModeTelemetryServiceTests : IDisposable public void RecordDriftEvent_DoesNotThrow() { using var service = CreateService(opt => opt.Enabled = true); +using StellaOps.TestKit; var endpoint = new Uri("https://collector.example.com"); // Should not throw diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryContextTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryContextTests.cs index 3811a7f44..61fca9b4d 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryContextTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryContextTests.cs @@ -80,6 +80,7 @@ public sealed class TelemetryContextTests public void TraceId_ReturnsActivityTraceId_WhenActivityExists() { using var activity = new Activity("test-operation"); +using StellaOps.TestKit; activity.Start(); var context = new TelemetryContext(); diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryExporterGuardTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryExporterGuardTests.cs index 93d8b2918..9a198f3d1 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryExporterGuardTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryExporterGuardTests.cs @@ -49,6 +49,7 @@ public sealed class TelemetryExporterGuardTests var provider = new CollectingLoggerProvider(); using var loggerFactory = LoggerFactory.Create(builder => builder.AddProvider(provider)); +using StellaOps.TestKit; var guard = new TelemetryExporterGuard(loggerFactory.CreateLogger(), policy); var descriptor = new TelemetryServiceDescriptor("PolicyEngine", "1.2.3"); var collectorOptions = new StellaOpsTelemetryOptions.CollectorOptions diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryPropagationHandlerTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryPropagationHandlerTests.cs index 81056484b..19aa14cfb 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryPropagationHandlerTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TelemetryPropagationHandlerTests.cs @@ -46,6 +46,7 @@ public class TelemetryPropagationHandlerTests using var activity = new Activity("test-trace").Start(); +using StellaOps.TestKit; var terminal = new RecordingHandler(); var handler = new TelemetryPropagationHandler(accessor, options) { diff --git a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TtfsIngestionServiceTests.cs b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TtfsIngestionServiceTests.cs index a30cb9168..6be5f65d9 100644 --- a/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TtfsIngestionServiceTests.cs +++ b/src/Telemetry/StellaOps.Telemetry.Core/StellaOps.Telemetry.Core.Tests/TtfsIngestionServiceTests.cs @@ -140,6 +140,7 @@ public sealed class TtfsIngestionServiceTests : IDisposable public void IngestEvent_DecisionRecorded_RecordsDecisionMetricsAndClickBudgetViolation() { using var loggerFactory = LoggerFactory.Create(_ => { }); +using StellaOps.TestKit; var service = new TtfsIngestionService(loggerFactory.CreateLogger()); service.IngestEvent(new TtfsEvent diff --git a/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/EvidenceLinkageIntegrationTests.cs b/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/EvidenceLinkageIntegrationTests.cs index 7f31fd5ae..3af5dbe01 100644 --- a/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/EvidenceLinkageIntegrationTests.cs +++ b/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/EvidenceLinkageIntegrationTests.cs @@ -63,6 +63,7 @@ public class EvidenceLinkageIntegrationTests Assert.Equal(manifestUri, evidence.ManifestUri); using var doc = JsonDocument.Parse(expectedJson); +using StellaOps.TestKit; var subject = doc.RootElement.GetProperty("subject").GetString(); Assert.Equal(subject, evidence.AttestationSubject); } diff --git a/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineIngestionWorkerTests.cs b/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineIngestionWorkerTests.cs index d9dd7c9c1..7124ceb10 100644 --- a/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineIngestionWorkerTests.cs +++ b/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineIngestionWorkerTests.cs @@ -66,6 +66,7 @@ public sealed class TimelineIngestionWorkerTests services.AddLogging(); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var hosted = provider.GetRequiredService(); var cts = new CancellationTokenSource(TimeSpan.FromSeconds(2)); await hosted.StartAsync(cts.Token); diff --git a/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineWorkerEndToEndTests.cs b/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineWorkerEndToEndTests.cs index 7994cc5f7..3c8909513 100644 --- a/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineWorkerEndToEndTests.cs +++ b/src/TimelineIndexer/StellaOps.TimelineIndexer/StellaOps.TimelineIndexer.Tests/TimelineWorkerEndToEndTests.cs @@ -354,6 +354,7 @@ public sealed class TimelineWorkerEndToEndTests services.AddLogging(); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var hosted = provider.GetRequiredService(); var cts = new CancellationTokenSource(TimeSpan.FromSeconds(3)); diff --git a/src/Unknowns/__Tests/StellaOps.Unknowns.Storage.Postgres.Tests/PostgresUnknownRepositoryTests.cs b/src/Unknowns/__Tests/StellaOps.Unknowns.Storage.Postgres.Tests/PostgresUnknownRepositoryTests.cs index e991e05fd..afb58c1de 100644 --- a/src/Unknowns/__Tests/StellaOps.Unknowns.Storage.Postgres.Tests/PostgresUnknownRepositoryTests.cs +++ b/src/Unknowns/__Tests/StellaOps.Unknowns.Storage.Postgres.Tests/PostgresUnknownRepositoryTests.cs @@ -127,6 +127,7 @@ public sealed class PostgresUnknownRepositoryTests : IAsyncLifetime """; await using var command = new NpgsqlCommand(schema, connection); +using StellaOps.TestKit; await command.ExecuteNonQueryAsync(); } diff --git a/src/__Analyzers/StellaOps.Determinism.Analyzers.Tests/CanonicalizationBoundaryAnalyzerTests.cs b/src/__Analyzers/StellaOps.Determinism.Analyzers.Tests/CanonicalizationBoundaryAnalyzerTests.cs index b28e53599..943a032a3 100644 --- a/src/__Analyzers/StellaOps.Determinism.Analyzers.Tests/CanonicalizationBoundaryAnalyzerTests.cs +++ b/src/__Analyzers/StellaOps.Determinism.Analyzers.Tests/CanonicalizationBoundaryAnalyzerTests.cs @@ -213,6 +213,7 @@ public class CanonicalizationBoundaryAnalyzerTests var testCode = """ using System.Text.Json; +using StellaOps.TestKit; public class SigningAttestor { public string CreatePayload(object data) diff --git a/src/__Libraries/StellaOps.Cryptography.Plugin.SmRemote.Tests/SmRemoteHttpProviderTests.cs b/src/__Libraries/StellaOps.Cryptography.Plugin.SmRemote.Tests/SmRemoteHttpProviderTests.cs index fba24d99e..69a717664 100644 --- a/src/__Libraries/StellaOps.Cryptography.Plugin.SmRemote.Tests/SmRemoteHttpProviderTests.cs +++ b/src/__Libraries/StellaOps.Cryptography.Plugin.SmRemote.Tests/SmRemoteHttpProviderTests.cs @@ -25,6 +25,7 @@ public class SmRemoteHttpProviderTests using var app = new WebApplicationFactory() .WithWebHostBuilder(_ => { }); +using StellaOps.TestKit; var client = app.CreateClient(); var status = await client.GetFromJsonAsync("/status"); status.Should().NotBeNull(); diff --git a/src/__Libraries/StellaOps.Cryptography.Tests/PolicyProvidersTests.cs b/src/__Libraries/StellaOps.Cryptography.Tests/PolicyProvidersTests.cs index cd775bdde..b2111fa1e 100644 --- a/src/__Libraries/StellaOps.Cryptography.Tests/PolicyProvidersTests.cs +++ b/src/__Libraries/StellaOps.Cryptography.Tests/PolicyProvidersTests.cs @@ -43,6 +43,7 @@ public class PolicyProvidersTests var provider = new EidasSoftCryptoProvider(); using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP384); +using StellaOps.TestKit; var key = new CryptoSigningKey( new CryptoKeyReference("eidas-es384"), SignatureAlgorithms.Es384, diff --git a/src/__Libraries/StellaOps.Cryptography.Tests/SimRemoteProviderTests.cs b/src/__Libraries/StellaOps.Cryptography.Tests/SimRemoteProviderTests.cs index 929a0368e..e91823700 100644 --- a/src/__Libraries/StellaOps.Cryptography.Tests/SimRemoteProviderTests.cs +++ b/src/__Libraries/StellaOps.Cryptography.Tests/SimRemoteProviderTests.cs @@ -51,6 +51,7 @@ public class SimRemoteProviderTests services.AddSingleton(); using var providerScope = services.BuildServiceProvider(); +using StellaOps.TestKit; var provider = providerScope.GetRequiredService(); var signer = provider.GetSigner("pq.sim", new CryptoKeyReference("sim-key")); var payload = Encoding.UTF8.GetBytes("hello-sim"); diff --git a/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AirGapTrustStoreIntegrationTests.cs b/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AirGapTrustStoreIntegrationTests.cs index 129ef9bc5..fdba682e6 100644 --- a/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AirGapTrustStoreIntegrationTests.cs +++ b/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AirGapTrustStoreIntegrationTests.cs @@ -337,6 +337,7 @@ public class AirGapTrustStoreIntegrationTests : IDisposable private static string GenerateEcdsaPublicKeyPem() { using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP256); +using StellaOps.TestKit; return ecdsa.ExportSubjectPublicKeyInfoPem(); } } diff --git a/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AuditReplayE2ETests.cs b/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AuditReplayE2ETests.cs index 258a91795..c1eb3d19b 100644 --- a/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AuditReplayE2ETests.cs +++ b/src/__Libraries/__Tests/StellaOps.AuditPack.Tests/AuditReplayE2ETests.cs @@ -513,6 +513,7 @@ public class AuditReplayE2ETests : IDisposable private static async Task ComputeFileHashAsync(string filePath) { await using var stream = File.OpenRead(filePath); +using StellaOps.TestKit; var hash = await SHA256.HashDataAsync(stream); return Convert.ToHexString(hash).ToLowerInvariant(); } diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/CloudKmsClientTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/CloudKmsClientTests.cs index 8cc9576fe..e17c02c8c 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/CloudKmsClientTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/CloudKmsClientTests.cs @@ -161,6 +161,7 @@ public sealed class CloudKmsClientTests public async Task Fido2Client_Signs_Verifies_And_Exports() { using var fixture = new EcdsaFixture(); +using StellaOps.TestKit; var authenticator = new TestFidoAuthenticator(fixture); var options = new Fido2Options { diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/FileKmsClientTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/FileKmsClientTests.cs index cf18c3706..fc8c5470e 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/FileKmsClientTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Kms.Tests/FileKmsClientTests.cs @@ -75,6 +75,7 @@ public sealed class FileKmsClientTests : IDisposable public async Task ExportAsync_ReturnsKeyMaterial() { using var client = CreateClient(); +using StellaOps.TestKit; var keyId = "kms-export"; await client.RotateAsync(keyId); diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/BouncyCastleEd25519CryptoProviderTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/BouncyCastleEd25519CryptoProviderTests.cs index f57c4dd07..d1411ae9c 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/BouncyCastleEd25519CryptoProviderTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/BouncyCastleEd25519CryptoProviderTests.cs @@ -22,6 +22,7 @@ public sealed class BouncyCastleEd25519CryptoProviderTests services.AddBouncyCastleEd25519Provider(); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var registry = provider.GetRequiredService(); var bcProvider = provider.GetServices() .OfType() diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/CryptoProGostSignerTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/CryptoProGostSignerTests.cs index 1f8d8c595..7b2f58550 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/CryptoProGostSignerTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/CryptoProGostSignerTests.cs @@ -31,6 +31,7 @@ public class CryptoProGostSignerTests var request = new CertificateRequest("CN=stellaops.test", ecdsa, HashAlgorithmName.SHA256); using var cert = request.CreateSelfSigned(DateTimeOffset.UtcNow.AddDays(-1), DateTimeOffset.UtcNow.AddDays(1)); +using StellaOps.TestKit; var entry = new CryptoProGostKeyEntry( "test-key", SignatureAlgorithms.GostR3410_2012_256, diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHashTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHashTests.cs index 29576d17a..959c5064f 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHashTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHashTests.cs @@ -84,6 +84,7 @@ public sealed class DefaultCryptoHashTests var hash = CryptoHashFactory.CreateDefault(); var expected = Convert.ToHexStringLower(SHA256.HashData(Sample)); await using var stream = new MemoryStream(Sample); +using StellaOps.TestKit; var actual = await hash.ComputeHashHexAsync(stream, HashAlgorithms.Sha256); Assert.Equal(expected, actual); } diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHmacTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHmacTests.cs index 13f0e91a3..69e07ef8b 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHmacTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoHmacTests.cs @@ -32,6 +32,7 @@ public sealed class DefaultCryptoHmacTests var hmac = DefaultCryptoHmac.CreateForTests(); var expected = Convert.ToHexStringLower(HMACSHA256.HashData(Key, Sample)); await using var stream = new MemoryStream(Sample); +using StellaOps.TestKit; var actual = await hmac.ComputeHmacHexForPurposeAsync(Key, stream, HmacPurpose.WebhookInterop); Assert.Equal(expected, actual); } diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoProviderSigningTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoProviderSigningTests.cs index b5b1c5e29..d03905812 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoProviderSigningTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/DefaultCryptoProviderSigningTests.cs @@ -61,6 +61,7 @@ public class DefaultCryptoProviderSigningTests { var provider = new DefaultCryptoProvider(); using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP256); +using StellaOps.TestKit; var parameters = ecdsa.ExportParameters(true); var signingKey = new CryptoSigningKey(new CryptoKeyReference("key-to-remove"), SignatureAlgorithms.Es256, in parameters, DateTimeOffset.UtcNow); diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/LibsodiumCryptoProviderTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/LibsodiumCryptoProviderTests.cs index 67fd2a013..ca9c05ccb 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/LibsodiumCryptoProviderTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/LibsodiumCryptoProviderTests.cs @@ -17,6 +17,7 @@ public class LibsodiumCryptoProviderTests { var provider = new LibsodiumCryptoProvider(); using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP256); +using StellaOps.TestKit; var parameters = ecdsa.ExportParameters(includePrivateParameters: true); var signingKey = new CryptoSigningKey( diff --git a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/Pkcs11GostProviderTests.cs b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/Pkcs11GostProviderTests.cs index 191971286..4f31a808a 100644 --- a/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/Pkcs11GostProviderTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Cryptography.Tests/Pkcs11GostProviderTests.cs @@ -23,6 +23,7 @@ public class Pkcs11GostProviderTests } using var ecdsa = ECDsa.Create(ECCurve.NamedCurves.nistP256); +using StellaOps.TestKit; var req = new CertificateRequest("CN=pkcs11.test", ecdsa, HashAlgorithmName.SHA256); var cert = req.CreateSelfSigned(DateTimeOffset.UtcNow.AddDays(-1), DateTimeOffset.UtcNow.AddDays(1)); diff --git a/src/__Libraries/__Tests/StellaOps.Infrastructure.Postgres.Tests/PostgresFixtureTests.cs b/src/__Libraries/__Tests/StellaOps.Infrastructure.Postgres.Tests/PostgresFixtureTests.cs index 57065f36c..819154f9b 100644 --- a/src/__Libraries/__Tests/StellaOps.Infrastructure.Postgres.Tests/PostgresFixtureTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Infrastructure.Postgres.Tests/PostgresFixtureTests.cs @@ -99,6 +99,7 @@ public sealed class PostgresFixtureTests : IAsyncLifetime await using var cmd = new Npgsql.NpgsqlCommand( "SELECT EXISTS(SELECT 1 FROM information_schema.schemata WHERE schema_name = @name)", conn); +using StellaOps.TestKit; cmd.Parameters.AddWithValue("name", schemaName); var exists = await cmd.ExecuteScalarAsync(); exists.Should().Be(false); diff --git a/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/MinimalApiBindingIntegrationTests.cs b/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/MinimalApiBindingIntegrationTests.cs index fd1c6e2d8..7753c1cb7 100644 --- a/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/MinimalApiBindingIntegrationTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/MinimalApiBindingIntegrationTests.cs @@ -273,6 +273,7 @@ public sealed class MinimalApiBindingIntegrationTests : IAsyncLifetime app.MapPatch("/items/{itemId}", async ([FromRoute] string itemId, HttpContext context) => { using var reader = new StreamReader(context.Request.Body); +using StellaOps.TestKit; var bodyText = await reader.ReadToEndAsync(); var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; var request = JsonSerializer.Deserialize(bodyText, options); diff --git a/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/StellaRouterBridgeIntegrationTests.cs b/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/StellaRouterBridgeIntegrationTests.cs index f28a88cac..18721c6b7 100644 --- a/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/StellaRouterBridgeIntegrationTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Microservice.AspNetCore.Tests/StellaRouterBridgeIntegrationTests.cs @@ -116,6 +116,7 @@ public sealed class StellaRouterBridgeIntegrationTests : IAsyncLifetime app.MapPut("/api/items/{id}", async (string id, HttpContext context) => { using var reader = new StreamReader(context.Request.Body); +using StellaOps.TestKit; var body = await reader.ReadToEndAsync(); var data = JsonSerializer.Deserialize(body); var name = data.GetProperty("name").GetString(); diff --git a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/InflightRequestTrackerTests.cs b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/InflightRequestTrackerTests.cs index c6995f984..3e30de832 100644 --- a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/InflightRequestTrackerTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/InflightRequestTrackerTests.cs @@ -305,6 +305,7 @@ public sealed class InflightRequestTrackerTests : IDisposable // Arrange - use a fresh tracker using var tracker = new InflightRequestTracker(NullLogger.Instance); +using StellaOps.TestKit; // Assert tracker.Count.Should().Be(0); } diff --git a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawRequestContextTests.cs b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawRequestContextTests.cs index 7d026e209..88b9d9298 100644 --- a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawRequestContextTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawRequestContextTests.cs @@ -232,6 +232,7 @@ public sealed class RawRequestContextTests { // Arrange using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; cts.Cancel(); // Act diff --git a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawResponseTests.cs b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawResponseTests.cs index b4ea46263..8aef67c05 100644 --- a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawResponseTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RawResponseTests.cs @@ -332,6 +332,7 @@ public sealed class RawResponseTests // Assert using var reader = new StreamReader(response.Body, Encoding.UTF8); +using StellaOps.TestKit; reader.ReadToEnd().Should().Be(message); } diff --git a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RouterConnectionManagerTests.cs b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RouterConnectionManagerTests.cs index 0a740d96a..826216d47 100644 --- a/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RouterConnectionManagerTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Microservice.Tests/RouterConnectionManagerTests.cs @@ -300,6 +300,7 @@ public sealed class RouterConnectionManagerTests : IDisposable TransportType = TransportType.InMemory }); using var manager = CreateManager(); +using StellaOps.TestKit; manager.CurrentStatus = InstanceHealthStatus.Degraded; manager.InFlightRequestCount = 10; manager.ErrorRate = 0.05; diff --git a/src/__Libraries/__Tests/StellaOps.Provcache.Tests/EvidenceChunkerTests.cs b/src/__Libraries/__Tests/StellaOps.Provcache.Tests/EvidenceChunkerTests.cs index 44f44cd26..fd3941e73 100644 --- a/src/__Libraries/__Tests/StellaOps.Provcache.Tests/EvidenceChunkerTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Provcache.Tests/EvidenceChunkerTests.cs @@ -259,6 +259,7 @@ public sealed class EvidenceChunkerTests var evidence = new byte[200]; Random.Shared.NextBytes(evidence); using var stream = new MemoryStream(evidence); +using StellaOps.TestKit; const string contentType = "application/octet-stream"; // Act diff --git a/src/__Libraries/__Tests/StellaOps.Provcache.Tests/MinimalProofExporterTests.cs b/src/__Libraries/__Tests/StellaOps.Provcache.Tests/MinimalProofExporterTests.cs index 963d6cc3a..a56423a81 100644 --- a/src/__Libraries/__Tests/StellaOps.Provcache.Tests/MinimalProofExporterTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Provcache.Tests/MinimalProofExporterTests.cs @@ -223,6 +223,7 @@ public sealed class MinimalProofExporterTests var options = new MinimalProofExportOptions { Density = ProofDensity.Lite }; using var stream = new MemoryStream(); +using StellaOps.TestKit; // Act await _exporter.ExportToStreamAsync(_testEntry.VeriKey, options, stream); diff --git a/src/__Libraries/__Tests/StellaOps.Provcache.Tests/StorageIntegrationTests.cs b/src/__Libraries/__Tests/StellaOps.Provcache.Tests/StorageIntegrationTests.cs index 652daedcf..db0b72c29 100644 --- a/src/__Libraries/__Tests/StellaOps.Provcache.Tests/StorageIntegrationTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Provcache.Tests/StorageIntegrationTests.cs @@ -139,6 +139,7 @@ public class WriteBehindQueueTests // Act - Start the queue and let it process using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; var task = queue.StartAsync(cts.Token); // Wait for processing diff --git a/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/MessageOrderingTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/MessageOrderingTests.cs index 526602275..f1e78cb7c 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/MessageOrderingTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/MessageOrderingTests.cs @@ -354,6 +354,7 @@ public sealed class MessageOrderingTests : IAsyncLifetime, IDisposable for (int run = 0; run < 3; run++) { using var channel = new InMemoryChannel($"determinism-{run}", bufferSize: 100); +using StellaOps.TestKit; var received = new List(); // Same sequence each run diff --git a/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/ServiceRegistrationIntegrationTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/ServiceRegistrationIntegrationTests.cs index 7f9a2ba3b..404332dbd 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/ServiceRegistrationIntegrationTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Integration.Tests/ServiceRegistrationIntegrationTests.cs @@ -147,6 +147,7 @@ public sealed class ServiceRegistrationIntegrationTests using var scope1 = _fixture.Services.CreateScope(); using var scope2 = _fixture.Services.CreateScope(); +using StellaOps.TestKit; var echo1 = scope1.ServiceProvider.GetService(); var echo2 = scope2.ServiceProvider.GetService(); diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/BackpressureTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/BackpressureTests.cs index dcfb0548a..affc20e98 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/BackpressureTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/BackpressureTests.cs @@ -424,6 +424,7 @@ public sealed class BackpressureTests // Arrange using var channel = new InMemoryChannel("bp-precancelled"); using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; await cts.CancelAsync(); // Act & Assert diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs index fcf9fdfd5..996c4ec66 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs @@ -290,6 +290,7 @@ public sealed class InMemoryChannelTests // Arrange using var channel = new InMemoryChannel("conn-123"); +using StellaOps.TestKit; // Start reader task var readerTask = Task.Run(async () => { diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryTransportComplianceTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryTransportComplianceTests.cs index 0406f5887..eadd68282 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryTransportComplianceTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryTransportComplianceTests.cs @@ -614,6 +614,7 @@ public sealed class InMemoryTransportComplianceTests // Arrange using var channel = new InMemoryChannel($"conn-det-{run}"); +using StellaOps.TestKit; var request = new RequestFrame { RequestId = "deterministic-req", diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/ConnectionFailureTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/ConnectionFailureTests.cs index b256d7091..ee5f504dc 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/ConnectionFailureTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/ConnectionFailureTests.cs @@ -587,6 +587,7 @@ public sealed class InMemoryConnectionFailureTests public async Task InMemoryChannel_CompletedWithError_PropagatesError() { using var channel = new InMemoryChannel("error-complete"); +using StellaOps.TestKit; var expectedException = new InvalidOperationException("Simulated failure"); // Complete with error diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/FrameFuzzTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/FrameFuzzTests.cs index a1d0fa487..33f3de7fd 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/FrameFuzzTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/FrameFuzzTests.cs @@ -515,6 +515,7 @@ public sealed class FrameFuzzTests { // Arrange - Payload with null bytes using var stream = new MemoryStream(); +using StellaOps.TestKit; var payloadWithNulls = new byte[] { 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00 }; var frame = new Frame diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportComplianceTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportComplianceTests.cs index 78f8717b4..891b21b2e 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportComplianceTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportComplianceTests.cs @@ -534,6 +534,7 @@ public sealed class TcpTransportComplianceTests // Arrange using var stream = new MemoryStream(); using var cts = new CancellationTokenSource(); +using StellaOps.TestKit; await cts.CancelAsync(); var frame = new Frame diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportTests.cs index 75260f859..2108c0cf4 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tcp.Tests/TcpTransportTests.cs @@ -777,6 +777,7 @@ public class TcpTransportClientTests // Arrange await using var client = CreateClient(); +using StellaOps.TestKit; // Act var action = () => client.CancelAllInflight("test shutdown"); diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportComplianceTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportComplianceTests.cs index ebf03e46e..ee1c35d24 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportComplianceTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportComplianceTests.cs @@ -474,6 +474,7 @@ public sealed class TlsTransportComplianceTests private static X509Certificate2 CreateTestCertificate(string subject) { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var request = new CertificateRequest( $"CN={subject}", rsa, diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportTests.cs index 72f5175b8..161e742a5 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Tls.Tests/TlsTransportTests.cs @@ -689,6 +689,7 @@ public class TlsIntegrationTests private static X509Certificate2 CreateSelfSignedServerCertificate(string hostname) { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var request = new CertificateRequest( $"CN={hostname}", rsa, diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportClientTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportClientTests.cs index 5c348da82..f27e41092 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportClientTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportClientTests.cs @@ -219,6 +219,7 @@ public sealed class UdpTransportClientTests }); await using var client = new UdpTransportClient(options, NullLogger.Instance); +using StellaOps.TestKit; Guid? receivedCorrelationId = null; // Act diff --git a/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportServerTests.cs b/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportServerTests.cs index 72f9abe05..8b28fc1b3 100644 --- a/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportServerTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportServerTests.cs @@ -268,6 +268,7 @@ public sealed class UdpTransportServerTests var options = Options.Create(new UdpTransportOptions { Port = 0 }); await using var server = new UdpTransportServer(options, NullLogger.Instance); +using StellaOps.TestKit; Frame? receivedFrame = null; server.OnFrame += (id, frame) => receivedFrame = frame; diff --git a/src/__Libraries/__Tests/StellaOps.Signals.Tests/CallgraphIngestionTests.cs b/src/__Libraries/__Tests/StellaOps.Signals.Tests/CallgraphIngestionTests.cs index 391ac98a7..573654a46 100644 --- a/src/__Libraries/__Tests/StellaOps.Signals.Tests/CallgraphIngestionTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Signals.Tests/CallgraphIngestionTests.cs @@ -135,6 +135,7 @@ public class CallgraphIngestionTests : IClassFixture Assert.Equal(HttpStatusCode.Accepted, secondResponse.StatusCode); using var scope = factory.Services.CreateScope(); +using StellaOps.TestKit; var repo = scope.ServiceProvider.GetRequiredService(); var doc = await repo.GetByIdAsync((await secondResponse.Content.ReadFromJsonAsync())!.CallgraphId, CancellationToken.None); diff --git a/src/__Libraries/__Tests/StellaOps.Signals.Tests/SignalsApiTests.cs b/src/__Libraries/__Tests/StellaOps.Signals.Tests/SignalsApiTests.cs index 9eb4435b4..1259be96b 100644 --- a/src/__Libraries/__Tests/StellaOps.Signals.Tests/SignalsApiTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Signals.Tests/SignalsApiTests.cs @@ -24,6 +24,7 @@ public class SignalsApiTests : IClassFixture public async Task Callgraph_Ingest_Response_Includes_Extended_Fields() { using var client = factory.CreateClient(); +using StellaOps.TestKit; client.DefaultRequestHeaders.Add("X-Scopes", "signals:write signals:read"); var req = CallgraphIngestionTests.CreateRequest("java", component: "api-test", version: "1.2.3"); diff --git a/src/__Libraries/__Tests/StellaOps.Signals.Tests/SyntheticRuntimeProbeTests.cs b/src/__Libraries/__Tests/StellaOps.Signals.Tests/SyntheticRuntimeProbeTests.cs index f273c7b97..af682f621 100644 --- a/src/__Libraries/__Tests/StellaOps.Signals.Tests/SyntheticRuntimeProbeTests.cs +++ b/src/__Libraries/__Tests/StellaOps.Signals.Tests/SyntheticRuntimeProbeTests.cs @@ -50,6 +50,7 @@ public class SyntheticRuntimeProbeTests : IClassFixture Assert.Equal(HttpStatusCode.OK, factRes.StatusCode); var factJson = await factRes.Content.ReadAsStringAsync(); using var doc = JsonDocument.Parse(factJson); +using StellaOps.TestKit; Assert.True(doc.RootElement.TryGetProperty("states", out var states)); Assert.True(states.GetArrayLength() > 0); Assert.True(doc.RootElement.TryGetProperty("runtimeFacts", out var runtimeFacts)); diff --git a/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/DsseVerifierTests.cs b/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/DsseVerifierTests.cs index 6b7bb7203..3a4e3fb01 100644 --- a/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/DsseVerifierTests.cs +++ b/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/DsseVerifierTests.cs @@ -26,6 +26,7 @@ public class DsseVerifierTests public void VerifiesRsaPssSignature() { using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var pub = rsa.ExportSubjectPublicKeyInfo(); var payload = "hello-world"; var payloadType = "application/vnd.stella.bundle"; diff --git a/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/ImportValidatorTests.cs b/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/ImportValidatorTests.cs index 6a3a27717..99c04b481 100644 --- a/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/ImportValidatorTests.cs +++ b/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/ImportValidatorTests.cs @@ -66,6 +66,7 @@ public sealed class ImportValidatorTests var timestamp = "{\"version\":1,\"expiresUtc\":\"2030-01-01T00:00:00Z\",\"snapshot\":{\"meta\":{\"hashes\":{\"sha256\":\"abc\"}}}}"; using var rsa = RSA.Create(2048); +using StellaOps.TestKit; var pub = rsa.ExportSubjectPublicKeyInfo(); var payload = "bundle-body"; diff --git a/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/OfflineKitMetricsTests.cs b/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/OfflineKitMetricsTests.cs index f19bfb718..dc3fbe5f4 100644 --- a/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/OfflineKitMetricsTests.cs +++ b/src/__Tests/AirGap/StellaOps.AirGap.Importer.Tests/OfflineKitMetricsTests.cs @@ -102,6 +102,7 @@ public sealed class OfflineKitMetricsTests : IDisposable { using var metrics = new OfflineKitMetrics(); +using StellaOps.TestKit; metrics.RecordRekorInclusionLatency(seconds: 0.5, success: false); Assert.Contains(_measurements, m => diff --git a/src/__Tests/Graph/StellaOps.Graph.Indexer.Tests/SbomIngestServiceCollectionExtensionsTests.cs b/src/__Tests/Graph/StellaOps.Graph.Indexer.Tests/SbomIngestServiceCollectionExtensionsTests.cs index d280de31f..b96d821e3 100644 --- a/src/__Tests/Graph/StellaOps.Graph.Indexer.Tests/SbomIngestServiceCollectionExtensionsTests.cs +++ b/src/__Tests/Graph/StellaOps.Graph.Indexer.Tests/SbomIngestServiceCollectionExtensionsTests.cs @@ -60,6 +60,7 @@ public sealed class SbomIngestServiceCollectionExtensionsTests : IDisposable services.AddSbomIngestPipeline(); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var processor = provider.GetRequiredService(); var snapshot = LoadSnapshot(); diff --git a/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/ToolEntrypointTests.cs b/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/ToolEntrypointTests.cs index bad5cdb2a..f4cfd0058 100644 --- a/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/ToolEntrypointTests.cs +++ b/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/ToolEntrypointTests.cs @@ -23,6 +23,7 @@ public sealed class ToolEntrypointTests var payload = Encoding.UTF8.GetBytes("payload"); var key = Convert.ToHexString(Encoding.UTF8.GetBytes("secret")); using var hmac = new System.Security.Cryptography.HMACSHA256(Encoding.UTF8.GetBytes("secret")); +using StellaOps.TestKit; var sig = Convert.ToHexString(hmac.ComputeHash(payload)); var tmp = Path.GetTempFileName(); diff --git a/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/VerificationLibraryTests.cs b/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/VerificationLibraryTests.cs index 8566478ae..16285dbd6 100644 --- a/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/VerificationLibraryTests.cs +++ b/src/__Tests/Provenance/StellaOps.Provenance.Attestation.Tests/VerificationLibraryTests.cs @@ -70,6 +70,7 @@ public sealed class VerificationLibraryTests }; using var sha = System.Security.Cryptography.SHA256.Create(); +using StellaOps.TestKit; var aggregate = sha.ComputeHash(Array.Empty().Concat(hops[0]).ToArray()); aggregate = sha.ComputeHash(aggregate.Concat(hops[1]).ToArray()); diff --git a/src/__Tests/StellaOps.Microservice.Tests/RequestDispatcherTests.cs b/src/__Tests/StellaOps.Microservice.Tests/RequestDispatcherTests.cs index 6fd0146db..96edacd88 100644 --- a/src/__Tests/StellaOps.Microservice.Tests/RequestDispatcherTests.cs +++ b/src/__Tests/StellaOps.Microservice.Tests/RequestDispatcherTests.cs @@ -108,6 +108,7 @@ public sealed class RequestDispatcherTests services.AddTransient(); using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var dispatcher = new RequestDispatcher( registry, provider, diff --git a/src/__Tests/StellaOps.Microservice.Tests/TypedEndpointAdapterTests.cs b/src/__Tests/StellaOps.Microservice.Tests/TypedEndpointAdapterTests.cs index 43e56b62c..73475e664 100644 --- a/src/__Tests/StellaOps.Microservice.Tests/TypedEndpointAdapterTests.cs +++ b/src/__Tests/StellaOps.Microservice.Tests/TypedEndpointAdapterTests.cs @@ -195,6 +195,7 @@ public class TypedEndpointAdapterTests response.Body.Position = 0; using var reader = new StreamReader(response.Body); +using StellaOps.TestKit; return await reader.ReadToEndAsync(); } } diff --git a/src/__Tests/StellaOps.Router.Config.Tests/RouterConfigTests.cs b/src/__Tests/StellaOps.Router.Config.Tests/RouterConfigTests.cs index c8f7ac543..10de461ed 100644 --- a/src/__Tests/StellaOps.Router.Config.Tests/RouterConfigTests.cs +++ b/src/__Tests/StellaOps.Router.Config.Tests/RouterConfigTests.cs @@ -331,6 +331,7 @@ routing: var logger = NullLogger.Instance; using var provider = new RouterConfigProvider(options, logger); +using StellaOps.TestKit; provider.Current.Routing.LocalRegion.Should().Be("eu1"); // Act - update file and manually reload diff --git a/src/__Tests/StellaOps.Router.Gateway.Tests/MiddlewareErrorScenarioTests.cs b/src/__Tests/StellaOps.Router.Gateway.Tests/MiddlewareErrorScenarioTests.cs index 3e901b024..c0e2c6365 100644 --- a/src/__Tests/StellaOps.Router.Gateway.Tests/MiddlewareErrorScenarioTests.cs +++ b/src/__Tests/StellaOps.Router.Gateway.Tests/MiddlewareErrorScenarioTests.cs @@ -179,6 +179,7 @@ public sealed class MiddlewareErrorScenarioTests { context.Response.Body.Position = 0; using var doc = JsonDocument.Parse(context.Response.Body); +using StellaOps.TestKit; return doc.RootElement.Clone(); } diff --git a/src/__Tests/StellaOps.Router.Gateway.Tests/RateLimitMiddlewareTests.cs b/src/__Tests/StellaOps.Router.Gateway.Tests/RateLimitMiddlewareTests.cs index 31824650d..942f62adc 100644 --- a/src/__Tests/StellaOps.Router.Gateway.Tests/RateLimitMiddlewareTests.cs +++ b/src/__Tests/StellaOps.Router.Gateway.Tests/RateLimitMiddlewareTests.cs @@ -89,6 +89,7 @@ public sealed class RateLimitMiddlewareTests var body = await new StreamReader(context.Response.Body, Encoding.UTF8).ReadToEndAsync(); using var json = JsonDocument.Parse(body); +using StellaOps.TestKit; json.RootElement.GetProperty("error").GetString().Should().Be("rate_limit_exceeded"); json.RootElement.GetProperty("scope").GetString().Should().Be("environment"); json.RootElement.GetProperty("limit").GetInt64().Should().Be(1); diff --git a/src/__Tests/StellaOps.Router.Gateway.Tests/RouterNodeConfigValidationTests.cs b/src/__Tests/StellaOps.Router.Gateway.Tests/RouterNodeConfigValidationTests.cs index dbb84f80c..e4d68764a 100644 --- a/src/__Tests/StellaOps.Router.Gateway.Tests/RouterNodeConfigValidationTests.cs +++ b/src/__Tests/StellaOps.Router.Gateway.Tests/RouterNodeConfigValidationTests.cs @@ -35,6 +35,7 @@ public sealed class RouterNodeConfigValidationTests using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var config = provider.GetRequiredService>().Value; config.Region.Should().Be("test"); diff --git a/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs b/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs index 64e8df178..075ed8283 100644 --- a/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs +++ b/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryChannelTests.cs @@ -99,6 +99,7 @@ public class InMemoryChannelTests { // Arrange using var channel = new InMemoryChannel("test-1"); +using StellaOps.TestKit; var instance = new InstanceDescriptor { InstanceId = "inst-1", diff --git a/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryConnectionRegistryTests.cs b/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryConnectionRegistryTests.cs index 55105589c..f37305345 100644 --- a/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryConnectionRegistryTests.cs +++ b/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/InMemoryConnectionRegistryTests.cs @@ -88,6 +88,7 @@ public class InMemoryConnectionRegistryTests // Arrange using var registry = new InMemoryConnectionRegistry(); +using StellaOps.TestKit; // Act var removed = registry.RemoveChannel("unknown"); diff --git a/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/StreamingFlowTests.cs b/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/StreamingFlowTests.cs index ce9699b32..df7a622d1 100644 --- a/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/StreamingFlowTests.cs +++ b/src/__Tests/StellaOps.Router.Transport.InMemory.Tests/StreamingFlowTests.cs @@ -72,6 +72,7 @@ public class StreamingFlowTests var testData = Encoding.UTF8.GetBytes("Test streaming data"); using var requestBody = new MemoryStream(testData); +using StellaOps.TestKit; Func readResponse = _ => Task.CompletedTask; // Act - this will send header + data frames diff --git a/src/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportTests.cs b/src/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportTests.cs index ee5be36fb..8ee60d0c9 100644 --- a/src/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportTests.cs +++ b/src/__Tests/StellaOps.Router.Transport.Udp.Tests/UdpTransportTests.cs @@ -495,6 +495,7 @@ public class UdpTransportTests }); await using var provider = services.BuildServiceProvider(); +using StellaOps.TestKit; var server = provider.GetRequiredService(); var client = provider.GetRequiredService(); diff --git a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/CorpusFixtureTests.cs b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/CorpusFixtureTests.cs index 3bfa593c1..2f1669b10 100644 --- a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/CorpusFixtureTests.cs +++ b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/CorpusFixtureTests.cs @@ -74,6 +74,7 @@ public class CorpusFixtureTests File.Exists(truthPath).Should().BeTrue($"{id} missing ground-truth.json"); using var truthDoc = JsonDocument.Parse(File.ReadAllBytes(truthPath)); +using StellaOps.TestKit; truthDoc.RootElement.GetProperty("schema_version").GetString().Should().Be(expectedSchemaVersion, $"{id} ground-truth schema_version mismatch"); truthDoc.RootElement.GetProperty("case_id").GetString().Should().Be(id, $"{id} ground-truth case_id must match manifest id"); diff --git a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/FixtureCoverageTests.cs b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/FixtureCoverageTests.cs index adfd8679f..3e47886e1 100644 --- a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/FixtureCoverageTests.cs +++ b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/FixtureCoverageTests.cs @@ -52,6 +52,7 @@ public sealed class FixtureCoverageTests File.Exists(manifestPath).Should().BeTrue($"{manifestPath} should exist"); using var doc = JsonDocument.Parse(File.ReadAllBytes(manifestPath)); +using StellaOps.TestKit; return doc.RootElement.EnumerateArray() .Select(entry => $"{entry.GetProperty("language").GetString()}/{entry.GetProperty("id").GetString()}") .ToArray(); diff --git a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchEvaluationHarnessTests.cs b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchEvaluationHarnessTests.cs index d3e2443c2..8f22ab7ef 100644 --- a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchEvaluationHarnessTests.cs +++ b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchEvaluationHarnessTests.cs @@ -66,6 +66,7 @@ public class ReachbenchEvaluationHarnessTests File.Exists(truthPath).Should().BeTrue(); using var truthDoc = JsonDocument.Parse(File.ReadAllBytes(truthPath)); +using StellaOps.TestKit; var paths = truthDoc.RootElement.GetProperty("paths"); paths.ValueKind.Should().Be(JsonValueKind.Array, $"{caseId}:{variant} should list truth paths as an array"); return paths.GetArrayLength(); diff --git a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchFixtureTests.cs b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchFixtureTests.cs index 8daa20aec..820474e43 100644 --- a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchFixtureTests.cs +++ b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/ReachbenchFixtureTests.cs @@ -148,6 +148,7 @@ public class ReachbenchFixtureTests var manifestPath = Path.Combine(variantPath, "manifest.json"); using var manifestStream = File.OpenRead(manifestPath); using var manifestDoc = JsonDocument.Parse(manifestStream); +using StellaOps.TestKit; var files = manifestDoc.RootElement.GetProperty("files"); foreach (var file in requiredFiles.Where(f => f != "manifest.json")) diff --git a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/SamplesPublicFixtureTests.cs b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/SamplesPublicFixtureTests.cs index da24d3bae..46ef8fe52 100644 --- a/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/SamplesPublicFixtureTests.cs +++ b/src/__Tests/reachability/StellaOps.Reachability.FixtureTests/SamplesPublicFixtureTests.cs @@ -30,6 +30,7 @@ public class SamplesPublicFixtureTests using var stream = File.OpenRead(manifestPath); using var doc = JsonDocument.Parse(stream); +using StellaOps.TestKit; doc.RootElement.ValueKind.Should().Be(JsonValueKind.Array); var keys = doc.RootElement.EnumerateArray() diff --git a/src/__Tests/reachability/StellaOps.Replay.Core.Tests/ReplayBundleWriterTests.cs b/src/__Tests/reachability/StellaOps.Replay.Core.Tests/ReplayBundleWriterTests.cs index f7e0b0731..92fc4646f 100644 --- a/src/__Tests/reachability/StellaOps.Replay.Core.Tests/ReplayBundleWriterTests.cs +++ b/src/__Tests/reachability/StellaOps.Replay.Core.Tests/ReplayBundleWriterTests.cs @@ -50,6 +50,7 @@ public sealed class ReplayBundleWriterTests { names.Add(entry.Name); using var ms = new MemoryStream(); +using StellaOps.TestKit; entry.DataStream!.CopyTo(ms); var text = System.Text.Encoding.UTF8.GetString(ms.ToArray()); text.Should().Be(entry.Name.StartsWith("a") ? "alpha" : "beta"); diff --git a/src/__Tests/reachability/StellaOps.ScannerSignals.IntegrationTests/ScannerToSignalsReachabilityTests.cs b/src/__Tests/reachability/StellaOps.ScannerSignals.IntegrationTests/ScannerToSignalsReachabilityTests.cs index 09bf25651..9f2142b41 100644 --- a/src/__Tests/reachability/StellaOps.ScannerSignals.IntegrationTests/ScannerToSignalsReachabilityTests.cs +++ b/src/__Tests/reachability/StellaOps.ScannerSignals.IntegrationTests/ScannerToSignalsReachabilityTests.cs @@ -330,6 +330,7 @@ public sealed class ScannerToSignalsReachabilityTests if (request.ManifestContent is not null) { await using var manifestBuffer = new MemoryStream(); +using StellaOps.TestKit; await request.ManifestContent.CopyToAsync(manifestBuffer, cancellationToken).ConfigureAwait(false); manifests[computedHash] = manifestBuffer.ToArray(); } diff --git a/src/__Tests/reachability/StellaOps.Signals.Reachability.Tests/ReachabilityScoringTests.cs b/src/__Tests/reachability/StellaOps.Signals.Reachability.Tests/ReachabilityScoringTests.cs index d8f72955d..2012d37ac 100644 --- a/src/__Tests/reachability/StellaOps.Signals.Reachability.Tests/ReachabilityScoringTests.cs +++ b/src/__Tests/reachability/StellaOps.Signals.Reachability.Tests/ReachabilityScoringTests.cs @@ -145,6 +145,7 @@ public sealed class ReachabilityScoringTests } using var doc = JsonDocument.Parse(line); +using StellaOps.TestKit; if (doc.RootElement.TryGetProperty("sid", out var sidProp)) { runtimeHits.Add(sidProp.GetString()!);