Skip to content

Commit ed4fae1

Browse files
Updates for tests
1 parent a1ce380 commit ed4fae1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Invoke-ListTests.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ function Invoke-ListTests {
7979
if ($ReportFound) {
8080
$AllReportTests = $IdentityTests + $DevicesTests
8181
# Use HashSet for O(1) lookup performance
82-
$TestLookup = [System.Collections.Generic.HashSet[string]]::new([string[]]$AllReportTests)
82+
$TestLookup = [System.Collections.Generic.HashSet[string]]::new()
83+
foreach ($test in $AllReportTests) {
84+
[void]$TestLookup.Add($test)
85+
}
8386
$FilteredTests = $TestResultsData.TestResults | Where-Object { $TestLookup.Contains($_.RowKey) }
8487
$TestResultsData.TestResults = @($FilteredTests)
8588
} else {

0 commit comments

Comments
 (0)