33 lines
666 B
PowerShell
33 lines
666 B
PowerShell
param(
|
|
[switch]$KeepRunning,
|
|
[switch]$NoReset,
|
|
[string]$Filter
|
|
)
|
|
|
|
. "$PSScriptRoot\lib\common.ps1"
|
|
|
|
Assert-Docker
|
|
|
|
if (-not $NoReset) {
|
|
& "$PSScriptRoot\reset-test.ps1" -Force
|
|
}
|
|
|
|
& "$PSScriptRoot\deploy-test.ps1"
|
|
|
|
try {
|
|
Write-Step "Running integration tests"
|
|
$env:CORTEX_TEST_BASE_URL = "http://localhost:5217"
|
|
|
|
$args = @("test", "tests/Cortex.IntegrationTests/Cortex.IntegrationTests.csproj", "--configuration", "Release")
|
|
if (-not [string]::IsNullOrWhiteSpace($Filter)) {
|
|
$args += @("--filter", $Filter)
|
|
}
|
|
|
|
Invoke-DotNet @args
|
|
}
|
|
finally {
|
|
if (-not $KeepRunning) {
|
|
& "$PSScriptRoot\stop-test.ps1"
|
|
}
|
|
}
|