Repair production backup recovery selection
This commit is contained in:
@@ -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'
|
||||
Reference in New Issue
Block a user