fix(worker): deploy persistent runtime companions
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
from pathlib import Path
|
||||
|
||||
REPOSITORY_ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_persistent_launcher_deploys_required_docker_names_companion() -> None:
|
||||
deployment = (
|
||||
REPOSITORY_ROOT
|
||||
/ "deploy"
|
||||
/ "telemetry-plane"
|
||||
/ "telegraf"
|
||||
/ "Update-NdcMissionCorePersistentLauncher.ps1"
|
||||
).read_text(encoding="utf-8")
|
||||
launcher = (
|
||||
REPOSITORY_ROOT
|
||||
/ "experiments"
|
||||
/ "perception"
|
||||
/ "worker"
|
||||
/ "Invoke-E15PersistentShadowRun.ps1"
|
||||
).read_text(encoding="utf-8")
|
||||
|
||||
assert '. (Join-Path $PSScriptRoot "MissionCoreDockerNames.ps1")' in launcher
|
||||
assert "[string]$DockerNamesCandidate" in deployment
|
||||
assert "[string]$ExpectedDockerNamesSha256" in deployment
|
||||
assert "[string]$ExpectedDockerNamesPredecessorSha256" in deployment
|
||||
assert '$dockerNamesPredecessor = if ($hadDockerNames)' in deployment
|
||||
assert "Copy-Item -LiteralPath $DockerNamesCandidate" in deployment
|
||||
assert "Remove-Item -LiteralPath $dockerNamesTarget" in deployment
|
||||
|
||||
|
||||
def test_perception_runner_deploys_required_runtime_companion() -> None:
|
||||
deployment = (
|
||||
REPOSITORY_ROOT
|
||||
/ "deploy"
|
||||
/ "telemetry-plane"
|
||||
/ "telegraf"
|
||||
/ "Update-NdcMissionCorePerceptionRunner.ps1"
|
||||
).read_text(encoding="utf-8")
|
||||
|
||||
assert "[string]$RuntimeCandidate" in deployment
|
||||
assert "[string]$ExpectedRuntimeSha256" in deployment
|
||||
assert "[string]$ExpectedRuntimePredecessorSha256" in deployment
|
||||
assert '$runtimeTarget = Join-Path $RunnerRoot "e15_shadow_runtime.py"' in deployment
|
||||
assert "Copy-Item -LiteralPath $RuntimeCandidate" in deployment
|
||||
assert "Copy-Item -LiteralPath $runtimeBackup" in deployment
|
||||
assert "RuntimeCandidateSha256" in deployment
|
||||
Reference in New Issue
Block a user