Skip to content

Commit

Permalink
#7 multi-region support
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLarsenNZ committed Mar 19, 2021
1 parent ec36169 commit 90c11c1
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion test/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@ while ($true) {
$lastNumber = $response.Number
}

$response = $null
$response = Invoke-RestMethod -Method Get -Uri 'https://numberservice-ase.azurewebsites.net/api/numbers/free'

if ($null -ne $response) {
if ($response.Number -ne $lastNumber) {
Write-Host $response -ForegroundColor Yellow
} else {
Write-Host $response -ForegroundColor White
}
$lastNumber = $response.Number
Write-Host
}

$response = $null
$response = Invoke-RestMethod -Method Put -Uri 'https://numberservice-ase.azurewebsites.net/api/numbers/free'

if ($null -ne $response) {
if ($response.Number -ne $lastNumber + 1) {
Write-Host $response -ForegroundColor Yellow
} else {
Write-Host $response -ForegroundColor White
}
$lastNumber = $response.Number
}

$response = $null
$response = Invoke-RestMethod -Method Get -Uri 'https://numberservice-aue.azurewebsites.net/api/numbers/free'

Expand All @@ -24,5 +49,5 @@ while ($true) {
Write-Host
}

Start-Sleep -Seconds 5
#Start-Sleep -Seconds 5
}

0 comments on commit 90c11c1

Please sign in to comment.