Merge branch 'main' of https://git.stella-ops.org/stella-ops.org/git.stella-ops.org
This commit is contained in:
@@ -25,6 +25,7 @@ public class ConcelierTimelineCursorTests : IClassFixture<WebApplicationFactory<
|
||||
client.DefaultRequestHeaders.Add("X-Stella-Tenant", "tenant-a");
|
||||
|
||||
using var request = new HttpRequestMessage(HttpMethod.Get, "/obs/concelier/timeline?cursor=5&limit=2");
|
||||
using StellaOps.TestKit;
|
||||
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("text/event-stream"));
|
||||
|
||||
var response = await client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead);
|
||||
|
||||
@@ -43,6 +43,7 @@ public class ConcelierTimelineEndpointTests : IClassFixture<WebApplicationFactor
|
||||
|
||||
var stream = await response.Content.ReadAsStreamAsync();
|
||||
using var reader = new StreamReader(stream);
|
||||
using StellaOps.TestKit;
|
||||
var firstLine = await reader.ReadLineAsync();
|
||||
firstLine.Should().NotBeNull();
|
||||
firstLine!.Should().StartWith("event: ingest.update");
|
||||
|
||||
@@ -69,6 +69,7 @@ public sealed class VulnExplorerTelemetryTests : IDisposable
|
||||
public void IsWithdrawn_DetectsWithdrawnFlagsAndTimestamps()
|
||||
{
|
||||
using var json = JsonDocument.Parse("{\"withdrawn\":true,\"withdrawn_at\":\"2024-10-10T00:00:00Z\"}");
|
||||
using StellaOps.TestKit;
|
||||
Assert.True(VulnExplorerTelemetry.IsWithdrawn(json.RootElement));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user