feat: Add in-memory implementations for issuer audit, key, repository, and trust management
Some checks failed
devportal-offline / build-offline (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
Some checks failed
devportal-offline / build-offline (push) Has been cancelled
Mirror Thin Bundle Sign & Verify / mirror-sign (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
api-governance / spectral-lint (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
- Introduced InMemoryIssuerAuditSink to retain audit entries for testing. - Implemented InMemoryIssuerKeyRepository for deterministic key storage. - Created InMemoryIssuerRepository to manage issuer records in memory. - Added InMemoryIssuerTrustRepository for managing issuer trust overrides. - Each repository utilizes concurrent collections for thread-safe operations. - Enhanced deprecation tracking with a comprehensive YAML schema for API governance.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using StellaOps.Cryptography;
|
||||
using StellaOps.Scanner.Reachability;
|
||||
using Xunit;
|
||||
|
||||
@@ -9,7 +10,7 @@ public class RichGraphPublisherTests
|
||||
[Fact]
|
||||
public async Task PublishesGraphToCas()
|
||||
{
|
||||
var writer = new RichGraphWriter();
|
||||
var writer = new RichGraphWriter(CryptoHashFactory.CreateDefault());
|
||||
var publisher = new ReachabilityRichGraphPublisher(writer);
|
||||
var cas = new FakeFileContentAddressableStore();
|
||||
|
||||
@@ -21,7 +22,8 @@ public class RichGraphPublisherTests
|
||||
var rich = RichGraphBuilder.FromUnion(union, "test", "1.0.0");
|
||||
var result = await publisher.PublishAsync(rich, "scan-1", cas, temp.Path);
|
||||
|
||||
Assert.StartsWith("sha256:", result.GraphHash);
|
||||
Assert.Contains(":", result.GraphHash); // hash format: algorithm:digest
|
||||
Assert.StartsWith("cas://reachability/graphs/", result.CasUri);
|
||||
Assert.Equal(1, result.NodeCount);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user