feat(audit): ExecutionId filter in the CLI and ManagementService
This commit is contained in:
@@ -428,6 +428,38 @@ public class AuditEndpointsTests
|
||||
Assert.Null(filter.Statuses);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseFilter_ExecutionId_ParsesIntoSingleValueGuid()
|
||||
{
|
||||
// executionId is a single-value Guid? filter — mirrors correlationId.
|
||||
var executionId = Guid.NewGuid();
|
||||
var query = new Microsoft.AspNetCore.Http.QueryCollection(
|
||||
new Dictionary<string, Microsoft.Extensions.Primitives.StringValues>
|
||||
{
|
||||
["executionId"] = executionId.ToString(),
|
||||
});
|
||||
|
||||
var filter = AuditEndpoints.ParseFilter(query);
|
||||
|
||||
Assert.Equal(executionId, filter.ExecutionId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseFilter_UnparseableExecutionId_IsDroppedSilently()
|
||||
{
|
||||
// Lax-parse contract: an unparseable executionId is dropped (no 400) —
|
||||
// mirrors the correlationId parse.
|
||||
var query = new Microsoft.AspNetCore.Http.QueryCollection(
|
||||
new Dictionary<string, Microsoft.Extensions.Primitives.StringValues>
|
||||
{
|
||||
["executionId"] = "not-a-guid",
|
||||
});
|
||||
|
||||
var filter = AuditEndpoints.ParseFilter(query);
|
||||
|
||||
Assert.Null(filter.ExecutionId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task Query_RepeatedChannelParams_ReachRepositoryAsMultiValueFilter()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user