7 lines
525 B
PowerShell
7 lines
525 B
PowerShell
param([Parameter(Mandatory=$true)][string]$BaseUrl)
|
|
$ErrorActionPreference='Stop';$base=$BaseUrl.TrimEnd('/');$live=Invoke-RestMethod -Uri "$base/health/live" -TimeoutSec 10;$ready=Invoke-RestMethod -Uri "$base/health/ready" -TimeoutSec 10
|
|
if($live.status -ne 'ok' -or $ready.status -ne 'ready'){throw 'health smoke test failed'}
|
|
$content=Invoke-RestMethod -Uri "$base/api/v1/content?page=1&pageSize=1" -TimeoutSec 10
|
|
if($content.success -ne $true){throw 'public content smoke test failed'}
|
|
Write-Output 'Smoke tests passed'
|