Add restore test automation scaffolding
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
param(
|
||||
[ValidateSet("freshness","vaultwarden","gitea","paperless")]
|
||||
[string]$Mode,
|
||||
[switch]$WhatIf
|
||||
)
|
||||
|
||||
$base = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
|
||||
switch ($Mode) {
|
||||
"freshness" {
|
||||
& (Join-Path $base "check-restore-freshness.ps1")
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
"vaultwarden" {
|
||||
if ($WhatIf) {
|
||||
& (Join-Path $base "vaultwarden-restore-test.ps1") -WhatIf
|
||||
} else {
|
||||
& (Join-Path $base "vaultwarden-restore-test.ps1")
|
||||
}
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
"gitea" {
|
||||
if ($WhatIf) {
|
||||
& (Join-Path $base "gitea-restore-test.ps1") -WhatIf
|
||||
} else {
|
||||
& (Join-Path $base "gitea-restore-test.ps1")
|
||||
}
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
"paperless" {
|
||||
if ($WhatIf) {
|
||||
& (Join-Path $base "paperless-restore-test.ps1") -WhatIf
|
||||
} else {
|
||||
& (Join-Path $base "paperless-restore-test.ps1")
|
||||
}
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user