journal/scripts/migration-gate.ps1
stan44 069b38071c Added Web WebGateway
Added connector so gateway works.
scripts are much more polished and functional.
2026-02-27 11:03:53 -06:00

47 lines
1.5 KiB
PowerShell

param(
[switch]$SkipSmoke,
[switch]$SkipApi
)
$ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $PSScriptRoot
$parityReport = Join-Path $repoRoot "logs\parity_harness_results.json"
Write-Host "migration-gate: repo root = $repoRoot"
Push-Location $repoRoot
try {
Write-Host "migration-gate: building sidecar binary..."
& "$repoRoot\scripts\dotnet-min.ps1" build Journal.Sidecar/Journal.Sidecar.csproj
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if (-not $SkipSmoke) {
Write-Host "migration-gate: running csharp smoke tests..."
& "$repoRoot\scripts\dotnet-min.ps1" run --project Journal.SmokeTests/Journal.SmokeTests.csproj
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
else {
Write-Host "migration-gate: skipping smoke tests (--SkipSmoke)."
}
Write-Host "migration-gate: running parity harness + fixture matrix..."
$env:PARITY_HARNESS_REPORT = $parityReport
& python -m unittest discover -s tests -p "test_parity_harness.py" -v
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
if (-not $SkipApi) {
Write-Host "migration-gate: running API contract tests..."
& python -m unittest discover -s tests -p "test_api_contract.py" -v
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
}
else {
Write-Host "migration-gate: skipping API contract tests (--SkipApi)."
}
Write-Host "migration-gate: PASS"
Write-Host "migration-gate: parity report => $parityReport"
}
finally {
Pop-Location
}