Skip to content

Commit

Permalink
test fix 1
Browse files Browse the repository at this point in the history
  • Loading branch information
anmenaga committed Jan 10, 2025
1 parent b50ea8e commit 3de6c8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions dsc/tests/dsc_config_get.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ Describe 'dsc config get tests' {
$lines = Get-Content $TestDrive/ErrorStream.txt
$ProgressMessagesFound = $False
foreach ($line in $lines) {
$jp = $line | ConvertFrom-Json
if ($jp.activity) { # if line is a progress message
$jp.percent_complete | Should -BeIn (0..100)
$ProgressMessagesFound = $True
if ($line.StartsWith('{')) {
$jp = $line | ConvertFrom-Json
if ($jp.activity) { # if line is a progress message
$jp.percent_complete | Should -BeIn (0..100)
$ProgressMessagesFound = $True
}
}
}
$ProgressMessagesFound | Should -BeTrue
Expand Down
10 changes: 6 additions & 4 deletions dsc/tests/dsc_resource_list.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ Describe 'Tests for listing resources' {
$lines = Get-Content $TestDrive/ErrorStream.txt
$ProgressMessagesFound = $False
foreach ($line in $lines) {
$jp = $line | ConvertFrom-Json
if ($jp.activity) { # if line is a progress message
$jp.percent_complete | Should -BeIn (0..100)
$ProgressMessagesFound = $True
if ($line.StartsWith('{')) {
$jp = $line | ConvertFrom-Json
if ($jp.activity) { # if line is a progress message
$jp.percent_complete | Should -BeIn (0..100)
$ProgressMessagesFound = $True
}
}
}
$ProgressMessagesFound | Should -BeTrue
Expand Down

0 comments on commit 3de6c8f

Please sign in to comment.