Skip to content

Commit 9962412

Browse files
authored
Restore run-roundtrip-test script and keep SkipTeardown removal in workflow only
1 parent 96601f8 commit 9962412

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/integration/all-resource-types/run-roundtrip-test.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
.\run-roundtrip-test.ps1 -SourceResourceGroup rg-src -TargetResourceGroup rg-tgt -PublisherEmail admin@contoso.com
3030
3131
# Keep resources after test for debugging
32+
.\run-roundtrip-test.ps1 -PublisherEmail admin@contoso.com -SkipTeardown
33+
34+
# Hard-delete APIM instances on teardown (purge from soft-delete)
3235
.\run-roundtrip-test.ps1 -PublisherEmail admin@contoso.com -HardDelete
3336
#>
3437

@@ -55,6 +58,8 @@ param(
5558

5659
[string]$ExtractOutputDir = "$PSScriptRoot/extracted-artifacts",
5760

61+
[switch]$SkipTeardown,
62+
5863
[switch]$HardDelete
5964
)
6065

@@ -131,6 +136,10 @@ function Get-ApiopsLogLevel([string]$ScriptLogLevel) {
131136
}
132137

133138
function Invoke-Teardown {
139+
if ($SkipTeardown) {
140+
Write-Host "⏭️ Teardown skipped (-SkipTeardown)"
141+
return
142+
}
134143
Write-Phase "🧹" "TEARDOWN — Deleting resource groups"
135144

136145
# Capture APIM names before deletion for potential hard-delete

0 commit comments

Comments
 (0)