test: migrate deployment smoke fixtures to the P1.1 layout
This commit is contained in:
@@ -149,13 +149,36 @@ try {
|
||||
|
||||
$remote = Join-Path $fixtureRoot "Workspace Remote/remote.git"
|
||||
$seed = Join-Path $fixtureRoot "Workspace Seed"
|
||||
[System.IO.Directory]::CreateDirectory((Join-Path $seed "workspaces")) | Out-Null
|
||||
[System.IO.Directory]::CreateDirectory($seed) | Out-Null
|
||||
Invoke-BoundedNative -FilePath "git" -Arguments @("init", "--bare", "--initial-branch=main", $remote) -Label "initialize Windows bare registry" | Out-Null
|
||||
Invoke-BoundedNative -FilePath "git" -Arguments @("-C", $seed, "init", "--initial-branch=main") -Label "initialize Windows registry seed" | Out-Null
|
||||
$workspaceFixture = Join-Path $spacedRepository "scripts/fixtures/workspace-registry-windows.yaml"
|
||||
$workspaceDestination = Join-Path $seed "workspaces/task13-windows.yaml"
|
||||
$workspaceDirectory = Join-Path $seed "task13-windows"
|
||||
$workspaceDestination = Join-Path $workspaceDirectory "workspace.yaml"
|
||||
$workspaceEvidence = Join-Path $workspaceDirectory "evidence"
|
||||
$catalogDestination = Join-Path $seed "thoth-workspaces.yaml"
|
||||
[System.IO.Directory]::CreateDirectory($workspaceDirectory) | Out-Null
|
||||
Copy-Item -LiteralPath $workspaceFixture -Destination $workspaceDestination
|
||||
Invoke-BoundedNative -FilePath "git" -Arguments @("-C", $seed, "add", "workspaces/task13-windows.yaml") -Label "stage Windows registry seed" | Out-Null
|
||||
Write-Utf8File (Join-Path $workspaceEvidence "guide.md") "guide v1`n"
|
||||
Write-Utf8File $catalogDestination @"
|
||||
schema_version: 1
|
||||
workspaces:
|
||||
- id: task13-windows
|
||||
name: Task 13 Windows
|
||||
"@
|
||||
if (-not (Test-Path -LiteralPath $catalogDestination)) {
|
||||
throw "the Windows root workspace catalog was not created"
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath $workspaceDestination)) {
|
||||
throw "the Windows nested workspace descriptor was not created"
|
||||
}
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $workspaceEvidence "guide.md"))) {
|
||||
throw "the Windows nested workspace evidence was not created"
|
||||
}
|
||||
if (Test-Path -LiteralPath (Join-Path $seed "workspaces/task13-windows.yaml")) {
|
||||
throw "the Windows legacy flat descriptor path must not be used"
|
||||
}
|
||||
Invoke-BoundedNative -FilePath "git" -Arguments @("-C", $seed, "add", "thoth-workspaces.yaml", "task13-windows/workspace.yaml", "task13-windows/evidence/guide.md") -Label "stage Windows registry seed" | Out-Null
|
||||
Invoke-BoundedNative -FilePath "git" -Arguments @("-C", $seed, "-c", "user.name=Task 13 Windows", "-c", "user.email=task13-windows@example.invalid", "commit", "-m", "Seed Windows smoke") -Label "commit Windows registry seed" | Out-Null
|
||||
Invoke-BoundedNative -FilePath "git" -Arguments @("-C", $seed, "push", $remote, "HEAD:main") -Label "push Windows registry seed" | Out-Null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user