Skip to content

Commit

Permalink
Update InvokeMSI.Tests.ps1 (#9)
Browse files Browse the repository at this point in the history
Fixed MSI Pester tests in cases where MSI tmp files have a variable-length hex suffix
  • Loading branch information
mgraeber-rc authored May 18, 2022
1 parent 96fd1a6 commit 7e1e4da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions TestHarnesses/T1218.007_Msiexec/InvokeMSI.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Describe 'Invoke-ATHMSI' {
$Result.RunnerProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerProcessName | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{4}\.tmp'
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{2,4}\.tmp'
$Result.RunnerChildProcessCommandLine | Should -Not -BeNullOrEmpty
}

Expand Down Expand Up @@ -183,7 +183,7 @@ Describe 'Invoke-ATHMSI' {
$Result.MsiExecProcessCommandLine | Should -BeNull
$Result.RunnerProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{4}\.tmp'
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{2,4}\.tmp'
$Result.RunnerChildProcessCommandLine | Should -Not -BeNullOrEmpty
}

Expand Down Expand Up @@ -261,7 +261,7 @@ Describe 'Invoke-ATHMSI' {
$Result.MsiExecProcessCommandLine | Should -BeNull
$Result.RunnerProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{4}\.tmp'
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{2,4}\.tmp'
$Result.RunnerChildProcessCommandLine | Should -Not -BeNullOrEmpty
}

Expand Down Expand Up @@ -313,7 +313,7 @@ Describe 'Invoke-ATHMSI' {
$Result.MsiExecProcessCommandLine | Should -BeNull
$Result.RunnerProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessId | Should -Not -BeNullOrEmpty
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{4}\.tmp'
$Result.RunnerChildProcessName | Should -Match 'MSI[A-Z0-9]{2,4}\.tmp'
$Result.RunnerChildProcessCommandLine | Should -Not -BeNullOrEmpty
}
}
Expand Down

0 comments on commit 7e1e4da

Please sign in to comment.