In progress
Some checks failed
Code Coverage / Generate Coverage Report (push) Has been cancelled
Tests / Run Tests (9.0.x) (push) Has been cancelled
Tests / Docker Build Test (push) Has been cancelled
Tests / Test Summary (push) Has been cancelled

This commit is contained in:
Yaojia Wang
2025-11-03 11:51:02 +01:00
parent 24fb646739
commit fe8ad1c1f9
101 changed files with 26471 additions and 250 deletions

View File

@@ -0,0 +1,35 @@
# Test script to verify no EF Core warnings
Write-Host "Starting API to check for EF Core warnings..." -ForegroundColor Cyan
$apiProcess = Start-Process -FilePath "dotnet" `
-ArgumentList "run --project C:\Users\yaoji\git\ColaCoder\product-master\colaflow-api\src\ColaFlow.API\ColaFlow.API.csproj" `
-WorkingDirectory "C:\Users\yaoji\git\ColaCoder\product-master\colaflow-api" `
-RedirectStandardOutput "api-output.log" `
-RedirectStandardError "api-errors.log" `
-PassThru `
-NoNewWindow
Write-Host "Waiting 15 seconds for API to start..." -ForegroundColor Yellow
Start-Sleep -Seconds 15
# Check for warnings
$warnings = Select-String -Path "api-errors.log" -Pattern "(ProjectId1|EpicId1|StoryId1|shadow state.*conflicting)" -Context 1,1
if ($warnings) {
Write-Host "`nERROR: EF Core warnings found!" -ForegroundColor Red
$warnings | ForEach-Object { Write-Host $_.Line -ForegroundColor Red }
$exitCode = 1
} else {
Write-Host "`nSUCCESS: No EF Core warnings found!" -ForegroundColor Green
$exitCode = 0
}
# Stop API
Stop-Process -Id $apiProcess.Id -Force
Write-Host "`nAPI stopped." -ForegroundColor Cyan
# Show last 20 lines of logs
Write-Host "`nLast 20 lines of error log:" -ForegroundColor Yellow
Get-Content "api-errors.log" -Tail 20
exit $exitCode