Skip to content

Commit

Permalink
Fixed copy/paste error in Get-Command Hook check.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel White committed Oct 25, 2023
1 parent b9b59ba commit c1efee5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Public/Invoke-AtomicTest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ function Invoke-AtomicTest {
elseif ($Cleanup) {
Write-KeyValue "Executing cleanup for test: " $testId
$final_command = Merge-InputArgs $test.executor.cleanup_command $test $InputArgs $PathToPayloads
if (Get-Command 'Invoke-AtomicRunnerPreAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPreAtomicCleanupHook }
if (Get-Command 'Invoke-AtomicRunnerPreAtomicCleanupHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPreAtomicCleanupHook }
$res = Invoke-ExecuteCommand $final_command $test.executor.name $executionPlatform $TimeoutSeconds $session -Interactive:$Interactive
Write-KeyValue "Done executing cleanup for test: " $testId
if (Get-Command 'Invoke-AtomicRunnerPreAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPostAtomicCleanupHook }
if (Get-Command 'Invoke-AtomicRunnerPostAtomicCleanupHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPostAtomicCleanupHook }
if ($(Test-IncludesTerraform $AT $testCount)) {
Remove-TerraformFiles $AT $testCount
}
Expand All @@ -486,7 +486,7 @@ function Invoke-AtomicTest {
if (Get-Command 'Invoke-AtomicRunnerPreAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPreAtomicHook }
$res = Invoke-ExecuteCommand $final_command $test.executor.name $executionPlatform $TimeoutSeconds $session -Interactive:$Interactive
Write-Host "Exit code: $($res.ExitCode)"
if (Get-Command 'Invoke-AtomicRunnerPreAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPostAtomicHook }
if (Get-Command 'Invoke-AtomicRunnerPostAtomicHook' -errorAction SilentlyContinue) { Invoke-AtomicRunnerPostAtomicHook }
$stopTime = Get-Date
if ($isLoggingModuleSet) {
&"$LoggingModule\Write-ExecutionLog" $startTime $stopTime $AT $testCount $test.name $test.auto_generated_guid $test.executor.name $test.description $final_command $ExecutionLogPath $executionHostname $executionUser $res (-Not($IsLinux -or $IsMacOS))
Expand Down

0 comments on commit c1efee5

Please sign in to comment.