Fix cleanup in PSResourceGet test (#24339)

This commit is contained in:
Aditya Patwardhan 2024-09-24 14:10:01 -07:00 committed by GitHub
parent 669d9e384e
commit b9c0127e83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -331,6 +331,14 @@ Describe "PSResourceGet - Script tests (Admin)" -Tags @('Feature', 'RequireAdmin
}
}
function FinalCleanUp
{
if(Test-Path $TempDir)
{
Remove-Item -Path $TempDir -Recurse -Force
}
}
Describe "PSResourceGet - ACR tests" -tags "Feature" {
BeforeAll {
@ -396,12 +404,3 @@ Describe "PSResourceGet - ACR tests" -tags "Feature" {
FinalCleanUp
}
}
function FinalCleanUp
{
if(Test-Path $TempDir)
{
Remove-Item -Path $TempDir -Recurse -Force
}
}