Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Strip non-ASCII chars from test harness PS scripts

Juan Denis37d9c63b9e50
diff --git a/scripts/test/agent-test.ps1 b/scripts/test/agent-test.ps1
index db21d5cf..69b84a13 100644
--- a/scripts/test/agent-test.ps1
+++ b/scripts/test/agent-test.ps1
@@ -10,7 +10,7 @@
- Builds the agent (go build) and runs it against the VM
- Verifies pairing short-code flow and that capabilities arrive
- This is intentionally minimal — it exercises the pairing happy path so
+ This is intentionally minimal -- it exercises the pairing happy path so
regressions in the agent <-> panel handshake get caught.
.PARAMETER VmName
@@ -53,7 +53,7 @@ $cred = @{
$resp = Invoke-RestMethod -Uri "http://${vmIp}:5000/api/v1/auth/register" `
-Method Post -ContentType 'application/json' -Body ($cred | ConvertTo-Json)
$token = $resp.access_token
-Write-Host " ✓ Admin registered, got JWT" -ForegroundColor Green
+Write-Host " [OK] Admin registered, got JWT" -ForegroundColor Green
# 2. Build agent
$agentDir = Join-Path $RepoRoot 'agent'
@@ -65,7 +65,7 @@ try {
& go build -o $agentBin ./cmd/serverkit-agent
if ($LASTEXITCODE -ne 0) { throw "go build failed" }
} finally { Pop-Location }
-Write-Host " ✓ Agent built: $agentBin" -ForegroundColor Green
+Write-Host " [OK] Agent built: $agentBin" -ForegroundColor Green
# 3. Generate pairing short-code by enrolling from "agent side"
# (Normally the agent does this itself; here we drive it explicitly to test API.)
@@ -78,7 +78,7 @@ $enrollBody = @{
$enroll = Invoke-RestMethod -Uri "http://${vmIp}:5000/api/v1/pairing/enroll" `
-Method Post -ContentType 'application/json' -Body $enrollBody
-Write-Host " ✓ Enrolled, short-code: $($enroll.code)" -ForegroundColor Green
+Write-Host " [OK] Enrolled, short-code: $($enroll.code)" -ForegroundColor Green
# 4. Operator-side claim
$claim = Invoke-RestMethod -Uri "http://${vmIp}:5000/api/v1/pairing/claim" `
@@ -86,7 +86,7 @@ $claim = Invoke-RestMethod -Uri "http://${vmIp}:5000/api/v1/pairing/claim" `
-Headers @{ Authorization = "Bearer $token" } `
-ContentType 'application/json' `
-Body (@{ code = $enroll.code; passphrase = 'test-passphrase'; name = $VmName } | ConvertTo-Json)
-Write-Host " ✓ Server claimed, id=$($claim.server_id)" -ForegroundColor Green
+Write-Host " [OK] Server claimed, id=$($claim.server_id)" -ForegroundColor Green
Write-Host "`nPairing API end-to-end OK." -ForegroundColor Green
Write-Host "Note: this exercises the API handshake; full agent process lifecycle test is TODO."
diff --git a/scripts/test/full-stack-test.ps1 b/scripts/test/full-stack-test.ps1
index 30ca3a00..3a120b0b 100644
--- a/scripts/test/full-stack-test.ps1
+++ b/scripts/test/full-stack-test.ps1
@@ -9,7 +9,7 @@
installer, then runs a pytest harness against the live API. Aggregates
everything into a single HTML report.
- Designed to be slow but unattended — 1-2 hours is expected on first run
+ Designed to be slow but unattended -- 1-2 hours is expected on first run
(cloud images download). Subsequent runs are ~15-30 min.
.PARAMETER Distros
@@ -72,7 +72,7 @@ $OutDir = Join-Path $PSScriptRoot "output\$RunId"
$null = New-Item -ItemType Directory -Force -Path $OutDir
Write-Host "========================================" -ForegroundColor Cyan
-Write-Host " ServerKit E2E Test — run $RunId" -ForegroundColor Cyan
+Write-Host " ServerKit E2E Test - run $RunId" -ForegroundColor Cyan
Write-Host " Repo: $RepoRoot" -ForegroundColor Cyan
Write-Host " Distros: $($Distros -join ', ')" -ForegroundColor Cyan
Write-Host " Output: $OutDir" -ForegroundColor Cyan
@@ -87,7 +87,7 @@ if (-not (Get-Command multipass -ErrorAction SilentlyContinue)) {
exit 2
}
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
- Write-Warning "python not on PATH — report.py won't run automatically; will print raw paths."
+ Write-Warning "python not on PATH - report.py won't run automatically; will print raw paths."
}
# --- build source tarball once -------------------------------------------
@@ -146,10 +146,10 @@ $jobs | Remove-Job
$liveVMs = @()
foreach ($r in $launchResults) {
if ($r.RC -eq 0) {
- Write-Host " ✓ $($r.Name) launched" -ForegroundColor Green
+ Write-Host " [OK] $($r.Name) launched" -ForegroundColor Green
$liveVMs += $r.Name
} else {
- Write-Host " ✗ $($r.Name) failed to launch (rc=$($r.RC))" -ForegroundColor Red
+ Write-Host " [FAIL] $($r.Name) failed to launch (rc=$($r.RC))" -ForegroundColor Red
$r.Log | ForEach-Object { Write-Host " $_" -ForegroundColor DarkGray }
}
}
@@ -261,7 +261,7 @@ if ($Keep) {
$failed = @($results | Where-Object { $_.Status -ne 'OK' })
Write-Host ""
if ($failed.Count -eq 0) {
- Write-Host "ALL GREEN — $($liveVMs.Count) VM(s) installed and passed tests." -ForegroundColor Green
+ Write-Host "ALL GREEN - $($liveVMs.Count) VM(s) installed and passed tests." -ForegroundColor Green
if ($reportHtml) { Start-Process $reportHtml }
exit 0
} else {