테스트 DB 계약과 실행 안전성 정렬
ci / backend (push) Failing after 0s
ci / static (push) Failing after 6s
ci / backend (pull_request) Failing after 1s
ci / static (pull_request) Failing after 7s
Build & Test with Secrets / build (pull_request) Failing after 1s
ci / frontend (push) Failing after 48s
Build & Test with Secrets / security-scan (pull_request) Successful in 5s
Build & Test with Secrets / frontend (pull_request) Failing after 1m23s
ci / frontend (pull_request) Failing after 1m32s
Build & Test with Secrets / notification (pull_request) Failing after 2s

This commit is contained in:
2026-08-02 17:37:12 +09:00
parent cc7d963755
commit 74ddd95a05
16 changed files with 258 additions and 66 deletions
@@ -20,8 +20,7 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
public ShadowRunGate3Tests()
{
_connectionString = Environment.GetEnvironmentVariable("KARTSELL_POSTGRES")
?? "Host=localhost;Port=5432;Database=kartselldb;Username=kartsell;Password=kartsell4321@!";
_connectionString = TestDatabaseConnection.GetConnectionString();
_dataSource = new NpgsqlDataSourceBuilder(_connectionString).Build();
_connectionFactory = new NpgsqlConnectionFactory(_dataSource);
}
@@ -86,8 +85,8 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
{
RunId = runId,
ModelId = modelId,
Start = new DateOnly(2024, 1, 2),
End = new DateOnly(2024, 8, 31),
Start = new DateTime(2024, 1, 2),
End = new DateTime(2024, 8, 31),
Status = "EvaluationComplete",
Now = now,
Gates = validationGates,
@@ -137,8 +136,8 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
{
RunId = runId,
ModelId = modelId,
Start = new DateOnly(2024, 1, 2),
End = new DateOnly(2024, 8, 31),
Start = new DateTime(2024, 1, 2),
End = new DateTime(2024, 8, 31),
Status = "EvaluationComplete",
Now = now,
Gates = validationGates
@@ -168,7 +167,7 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
// Arrange: Create shadow run that passes all gates
var runId = Guid.NewGuid();
var modelId = Guid.NewGuid();
var now = _clock.UtcNow.DateTime;
var now = MarketTime.SeoulDateTime(_clock.UtcNow);
var validationGates = """
{
@@ -190,8 +189,8 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
{
RunId = runId,
ModelId = modelId,
Start = new DateOnly(2024, 1, 2),
End = new DateOnly(2024, 8, 31),
Start = new DateTime(2024, 1, 2),
End = new DateTime(2024, 8, 31),
Status = "EvaluationComplete",
Now = now,
Gates = validationGates
@@ -227,7 +226,7 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
var runId = Guid.NewGuid();
var modelId = Guid.NewGuid();
var correlationId = Guid.NewGuid().ToString();
var now = _clock.UtcNow.DateTime;
var now = MarketTime.SeoulDateTime(_clock.UtcNow);
var validationGates = """{"all_gates_passed": true}""";
@@ -243,8 +242,8 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
{
RunId = runId,
ModelId = modelId,
Start = new DateOnly(2024, 1, 2),
End = new DateOnly(2024, 8, 31),
Start = new DateTime(2024, 1, 2),
End = new DateTime(2024, 8, 31),
Status = "EvaluationComplete",
Now = now,
Gates = validationGates
@@ -255,13 +254,13 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
await connection.ExecuteAsync("""
INSERT INTO building_blocks.outbox_message
(message_id, event_type, schema_version, payload_json, correlation_id, occurred_at, payload_hash, published_at)
VALUES (@EventId, @EventType, 1, @Payload, @CorrelationId, @Now, @Hash, @Now)
VALUES (@EventId, @EventType, 1, CAST(@Payload AS jsonb), @CorrelationId, @Now, @Hash, @Now)
""",
new
{
EventId = eventId,
EventType = "ShadowRunCompleted",
Payload = $$$"""{{"runId":"{runId}","modelId":"{modelId}"}}""",
Payload = $"{{\"runId\":\"{runId}\",\"modelId\":\"{modelId}\"}}",
CorrelationId = correlationId,
Now = now,
Hash = "hash123"
@@ -310,8 +309,8 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
{
RunId = runId,
ModelId = modelId,
Start = new DateOnly(2024, 1, 2),
End = new DateOnly(2024, 8, 31),
Start = new DateTime(2024, 1, 2),
End = new DateTime(2024, 8, 31),
Status = "EvaluationComplete",
Phase = phaseAnalysis
});
@@ -364,8 +363,8 @@ public sealed class ShadowRunGate3Tests : IAsyncLifetime
{
RunId = runId,
ModelId = modelId,
Start = new DateOnly(2024, 1, 2),
End = new DateOnly(2024, 8, 31),
Start = new DateTime(2024, 1, 2),
End = new DateTime(2024, 8, 31),
Now = now,
Gates = validationGates
});