release orchestration strengthening
This commit is contained in:
@@ -11,6 +11,7 @@ using StellaOps.ReachGraph.Deduplication;
|
||||
using StellaOps.ReachGraph.Schema;
|
||||
using StellaOps.VexLens.Models;
|
||||
using StellaOps.VexLens.NoiseGate;
|
||||
using StellaOps.VexLens.Delta;
|
||||
using Xunit;
|
||||
|
||||
namespace StellaOps.VexLens.Tests.NoiseGate;
|
||||
@@ -91,9 +92,9 @@ public class NoiseGateServiceTests
|
||||
|
||||
// Assert
|
||||
result.Should().HaveCount(1);
|
||||
result[0].EntryPointId.Should().Be("node-a");
|
||||
result[0].SinkId.Should().Be("node-b");
|
||||
result[0].ProvenanceCount.Should().Be(2);
|
||||
result[0].From.Should().Be("node-a");
|
||||
result[0].To.Should().Be("node-b");
|
||||
result[0].SourceCount.Should().Be(1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -181,7 +182,11 @@ public class NoiseGateServiceTests
|
||||
SchemaVersion = "reachgraph.min@v1",
|
||||
Artifact = new ReachGraphArtifact("test", "sha256:abc123", []),
|
||||
Scope = new ReachGraphScope(["main"], ["*"]),
|
||||
Nodes = [new ReachGraphNode { Id = "node-a" }, new ReachGraphNode { Id = "node-b" }],
|
||||
Nodes =
|
||||
[
|
||||
new ReachGraphNode { Id = "node-a", Kind = ReachGraphNodeKind.Function, Ref = "node-a" },
|
||||
new ReachGraphNode { Id = "node-b", Kind = ReachGraphNodeKind.Function, Ref = "node-b" }
|
||||
],
|
||||
Edges =
|
||||
[
|
||||
new ReachGraphEdge
|
||||
@@ -197,7 +202,12 @@ public class NoiseGateServiceTests
|
||||
Why = new EdgeExplanation { Type = EdgeExplanationType.DirectCall, Confidence = 0.85 }
|
||||
}
|
||||
],
|
||||
Provenance = new ReachGraphProvenance("scanner", "1.0", _timeProvider.GetUtcNow())
|
||||
Provenance = new ReachGraphProvenance
|
||||
{
|
||||
Analyzer = new ReachGraphAnalyzer("scanner", "1.0", "sha256:tool"),
|
||||
Inputs = new ReachGraphInputs { Sbom = "sha256:sbom" },
|
||||
ComputedAt = _timeProvider.GetUtcNow()
|
||||
}
|
||||
};
|
||||
|
||||
var request = new NoiseGateRequest
|
||||
@@ -288,7 +298,7 @@ public class NoiseGateServiceTests
|
||||
// Assert
|
||||
delta.Summary.NewCount.Should().Be(1);
|
||||
delta.Summary.ResolvedCount.Should().Be(0);
|
||||
delta.Entries.Should().ContainSingle(e => e.Section == Delta.DeltaSection.New);
|
||||
delta.Entries.Should().ContainSingle(e => e.Section == DeltaSection.New);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -363,7 +373,7 @@ public class NoiseGateServiceTests
|
||||
|
||||
// Assert
|
||||
delta.Summary.ResolvedCount.Should().Be(1);
|
||||
delta.Entries.Should().ContainSingle(e => e.Section == Delta.DeltaSection.Resolved);
|
||||
delta.Entries.Should().ContainSingle(e => e.Section == DeltaSection.Resolved);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -437,7 +447,7 @@ public class NoiseGateServiceTests
|
||||
|
||||
// Assert
|
||||
delta.Summary.ConfidenceUpCount.Should().Be(1);
|
||||
delta.Entries.Should().ContainSingle(e => e.Section == Delta.DeltaSection.ConfidenceUp);
|
||||
delta.Entries.Should().ContainSingle(e => e.Section == DeltaSection.ConfidenceUp);
|
||||
}
|
||||
|
||||
private sealed class TestOptionsMonitor<T> : IOptionsMonitor<T>
|
||||
|
||||
Reference in New Issue
Block a user