test: make dotnet evidence tests runner portable
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 15s
Validators (Pushes and Pull Requests) / validate-core (push) Failing after 1m23s

This commit is contained in:
2026-07-12 12:40:54 +09:00
parent d49e45b308
commit 521d1c0b3d
5 changed files with 21 additions and 3 deletions
@@ -46,7 +46,8 @@ namespace QuantEngine.Application.Services
result.TotalElapsedMilliseconds = totalSw.Elapsed.TotalMilliseconds;
// Output JSON file for integration validation
var tempDir = @"C:\Temp\data_feed\Temp";
var tempDir = Environment.GetEnvironmentVariable("QE_TEMP_ROOT")
?? Path.Combine(Directory.GetCurrentDirectory(), "Temp");
if (!Directory.Exists(tempDir))
{
Directory.CreateDirectory(tempDir);
@@ -0,0 +1,12 @@
{
"schema_version": "2026-05-24-operational-report-v1",
"source_json": "GatherTradingData.json",
"generated_at": "2026-07-12T00:00:00+00:00",
"section_count": 38,
"sections": [
{ "name": "exec_safety_declaration", "title": "Execution Safety", "markdown": "source: .NET operational report builder" },
{ "name": "portfolio_health", "title": "Portfolio Health", "markdown": "fixture" },
{ "name": "factor_evidence", "title": "Factor Evidence", "markdown": "fixture" },
{ "name": "decision_ledger", "title": "Decision Ledger", "markdown": "fixture" }
]
}
@@ -25,7 +25,9 @@ namespace QuantEngine.Core.Tests
Assert.True(step.ElapsedMilliseconds > 0);
}
var expectedJsonPath = @"C:\Temp\data_feed\Temp\dotnet_pipeline_e2e_v1.json";
var tempRoot = Environment.GetEnvironmentVariable("QE_TEMP_ROOT")
?? Path.Combine(Directory.GetCurrentDirectory(), "Temp");
var expectedJsonPath = Path.Combine(tempRoot, "dotnet_pipeline_e2e_v1.json");
Assert.True(File.Exists(expectedJsonPath));
var jsonContent = File.ReadAllText(expectedJsonPath);
@@ -23,5 +23,8 @@
<ProjectReference Include="..\QuantEngine.Application\QuantEngine.Application.csproj" />
<ProjectReference Include="..\QuantEngine.Infrastructure\QuantEngine.Infrastructure.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="Fixtures\operational_report.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Project>
@@ -5,7 +5,7 @@ public class UnitTest1
[Fact]
public void OperationalReportLoader_ParsesCanonicalTempReport()
{
var path = Path.GetFullPath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "..", "..", "Temp", "operational_report.json"));
var path = Path.Combine(AppContext.BaseDirectory, "Fixtures", "operational_report.json");
var report = QuantEngine.Core.Infrastructure.OperationalReportLoader.Load(path);
Assert.Equal("2026-05-24-operational-report-v1", report.SchemaVersion);