Add EveConformance handoff proof
This commit is contained in:
parent
96968931a1
commit
5667483bed
9 changed files with 226 additions and 2 deletions
|
|
@ -30,7 +30,10 @@ Copy-Item -LiteralPath $sourceExport -Destination $consumerExport -Recurse
|
|||
|
||||
Push-Location $projectRoot
|
||||
try {
|
||||
node .\tools\conformance\consume-export.mjs $consumerExport
|
||||
node .\tools\conformance\consume-export.mjs $consumerExport --expect-conformance-handoff
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Conformance consumer smoke failed with exit code $LASTEXITCODE"
|
||||
}
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
|
|
|||
107
scripts/run-eveconformance-handoff-smoke.ps1
Normal file
107
scripts/run-eveconformance-handoff-smoke.ps1
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
param(
|
||||
[string] $HandoffPath = "tools\conformance\eveconformance-handoff.json",
|
||||
[string] $ManifestPath = "tools\parity\parity-manifest.json",
|
||||
[string] $ExportDirectory = "artifacts\conformance\latest"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$projectRoot = Split-Path -Parent $PSScriptRoot
|
||||
$absoluteHandoffPath = if ([System.IO.Path]::IsPathRooted($HandoffPath)) {
|
||||
$HandoffPath
|
||||
} else {
|
||||
Join-Path $projectRoot $HandoffPath
|
||||
}
|
||||
$absoluteManifestPath = if ([System.IO.Path]::IsPathRooted($ManifestPath)) {
|
||||
$ManifestPath
|
||||
} else {
|
||||
Join-Path $projectRoot $ManifestPath
|
||||
}
|
||||
$absoluteExportDirectory = if ([System.IO.Path]::IsPathRooted($ExportDirectory)) {
|
||||
$ExportDirectory
|
||||
} else {
|
||||
Join-Path $projectRoot $ExportDirectory
|
||||
}
|
||||
|
||||
if (-not (Test-Path -LiteralPath $absoluteHandoffPath)) {
|
||||
throw "EveConformance handoff manifest not found: $absoluteHandoffPath"
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $absoluteManifestPath)) {
|
||||
throw "Parity manifest not found: $absoluteManifestPath"
|
||||
}
|
||||
|
||||
$handoff = Get-Content -LiteralPath $absoluteHandoffPath -Raw | ConvertFrom-Json
|
||||
$manifest = Get-Content -LiteralPath $absoluteManifestPath -Raw | ConvertFrom-Json
|
||||
|
||||
if ($handoff.schema -ne "gamecult.eve.conformance_handoff.v1") {
|
||||
throw "Unexpected EveConformance handoff schema: $($handoff.schema)"
|
||||
}
|
||||
if ($handoff.splitTarget -ne "EveConformance") {
|
||||
throw "Unexpected EveConformance handoff split target: $($handoff.splitTarget)"
|
||||
}
|
||||
if ($handoff.ownerRepo -ne "EveConformance") {
|
||||
throw "Unexpected EveConformance handoff owner: $($handoff.ownerRepo)"
|
||||
}
|
||||
if ($handoff.currentHostRepo -ne "Eve") {
|
||||
throw "Unexpected EveConformance handoff host: $($handoff.currentHostRepo)"
|
||||
}
|
||||
|
||||
$expectedPath = $HandoffPath.Replace("\", "/")
|
||||
if ($manifest.repoStrategy.conformanceHandoffPath -ne $expectedPath) {
|
||||
throw "Parity manifest does not point at EveConformance handoff. Expected $expectedPath got $($manifest.repoStrategy.conformanceHandoffPath)"
|
||||
}
|
||||
|
||||
foreach ($id in @("conformance-runner", "conformance-schemas", "consumer-smokes", "fixture-corpus")) {
|
||||
$moveSet = @($handoff.moveSets) | Where-Object { $_.id -eq $id } | Select-Object -First 1
|
||||
if (-not $moveSet) {
|
||||
throw "EveConformance handoff missing move set: $id"
|
||||
}
|
||||
if ($moveSet.destinationOwner -ne "EveConformance") {
|
||||
throw "EveConformance move set $id has unexpected destination owner: $($moveSet.destinationOwner)"
|
||||
}
|
||||
if (-not $moveSet.replacementProof) {
|
||||
throw "EveConformance move set $id missing replacement proof"
|
||||
}
|
||||
foreach ($relativePath in @($moveSet.currentPaths)) {
|
||||
$absolutePath = Join-Path $projectRoot $relativePath
|
||||
if (-not (Test-Path -LiteralPath $absolutePath)) {
|
||||
throw "EveConformance move set $id references missing current path: $relativePath"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($contract in @(
|
||||
"gamecult.eve.surface.v1",
|
||||
"gamecult.eve.command.v1",
|
||||
"gamecult.eve.conformance_export.v1",
|
||||
"gamecult.eve.conformance_fixture.v1",
|
||||
"gamecult.eve.provider_scenario.v1",
|
||||
"gamecult.eve.plugin.v1",
|
||||
"gamecult.eve.provider_advertisement.v1",
|
||||
"gamecult.eve.runtime_capability.v1"
|
||||
)) {
|
||||
if (-not (@($handoff.contractInputs) -contains $contract)) {
|
||||
throw "EveConformance handoff missing contract input: $contract"
|
||||
}
|
||||
}
|
||||
|
||||
if (Test-Path -LiteralPath (Join-Path $absoluteExportDirectory "index.json")) {
|
||||
$export = Get-Content -LiteralPath (Join-Path $absoluteExportDirectory "index.json") -Raw | ConvertFrom-Json
|
||||
if ($export.conformanceHandoffPath -ne $expectedPath) {
|
||||
throw "Conformance export does not point at EveConformance handoff. Expected $expectedPath got $($export.conformanceHandoffPath)"
|
||||
}
|
||||
foreach ($packId in @("core", "plugin", "provider", "runtime")) {
|
||||
$pack = @($export.packs) | Where-Object { $_.id -eq $packId } | Select-Object -First 1
|
||||
if (-not $pack) {
|
||||
throw "Conformance export missing pack: $packId"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($proof in @($handoff.requiredExternalProofs)) {
|
||||
if (-not $proof) {
|
||||
throw "EveConformance handoff contains an empty required external proof"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "EveConformance handoff smoke passed: $absoluteHandoffPath"
|
||||
|
|
@ -14,6 +14,7 @@ $env:EVE_PARITY_OUTPUT = if ([System.IO.Path]::IsPathRooted($OutputDirectory)) {
|
|||
Push-Location $projectRoot
|
||||
try {
|
||||
node .\tools\parity\run-parity.mjs
|
||||
& (Join-Path $PSScriptRoot "run-eveconformance-handoff-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-plugin-handoff-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-aetheria-provider-handoff-smoke.ps1")
|
||||
& (Join-Path $PSScriptRoot "run-eveunity-split-handoff-smoke.ps1")
|
||||
|
|
|
|||
Loading…
Reference in a new issue