Repair production backup recovery selection

This commit is contained in:
m
2026-08-22 11:14:21 +03:00
parent 8687c9b792
commit 15c9517d0c
5 changed files with 41 additions and 4 deletions
@@ -0,0 +1,10 @@
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
$script = Get-Content -LiteralPath (Join-Path $PSScriptRoot '../../deploy/verify-latest-postgres-backup.sh') -Raw
if ($script -notmatch "-regex '\.\*/\[0-9\]\{8\}T\[0-9\]\{6\}Z\$'") {
throw 'restore selector does not restrict candidates to timestamp directories'
}
if ($script -notmatch 'invalid timestamp') { throw 'restore selector lacks timestamp fail-closed guard' }
if ($script -match "! -name '\.\*'") { throw 'restore selector still accepts arbitrary non-hidden directories' }
Write-Output 'verify-latest backup selector tests: PASS'