Skip to content

Commit 3aae8d6

Browse files
authored
fix(tests): place v2 Pester tests inside the Hidi test project (#895)
* fix(tests): classify v2 NuGet helper Pester tests Link the existing Pester script into the Hidi test project so analysis treats it as test code without excluding files or changing release behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f8d164a5-72a6-482a-8749-ae5c6e47a0e5 * fix(tests): place v2 Pester tests inside the Hidi test project Move the existing script unchanged into the physical test project directory so the scanner assigns it to test sources. Remove the ineffective sibling link and update the workflow and local test documentation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f8d164a5-72a6-482a-8749-ae5c6e47a0e5 --------- Copilot-Session: f8d164a5-72a6-482a-8749-ae5c6e47a0e5
1 parent 22afdb2 commit 3aae8d6

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎.github/workflows/sonarcloud.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
$outputRoot = Join-Path $PWD 'artifacts\hidi\powershell-coverage'
7171
New-Item -ItemType Directory -Force -Path $outputRoot | Out-Null
7272
$configuration = New-PesterConfiguration
73-
$configuration.Run.Path = 'test\scripts\check-nuget-package-published.Tests.ps1'
73+
$configuration.Run.Path = 'test\Microsoft.OpenApi.Hidi.Tests\check-nuget-package-published.Tests.ps1'
7474
$configuration.Run.PassThru = $true
7575
$configuration.CodeCoverage.Enabled = $true
7676
$configuration.CodeCoverage.Path = $helper

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ This pipeline implementation does not enable publishing or authorize resources.
114114

115115
The SonarCloud workflow runs the private-feed helper tests with Pester 5.7.1 and
116116
converts measured JaCoCo line hits to Sonar generic coverage, alongside the
117-
existing C# OpenCover reports. Run the helper tests locally with
118-
`Import-Module Pester -RequiredVersion 5.7.1; Invoke-Pester .\test\scripts\check-nuget-package-published.Tests.ps1`.
117+
existing C# OpenCover reports. The Pester script resides inside the Hidi test
118+
project directory so Sonar assigns it to test sources; a linked sibling file
119+
does not establish that ownership. Run the helper tests locally with
120+
`Import-Module Pester -RequiredVersion 5.7.1; Invoke-Pester .\test\Microsoft.OpenApi.Hidi.Tests\check-nuget-package-published.Tests.ps1`.
119121

120122
---
121123

test/scripts/check-nuget-package-published.Tests.ps1 renamed to test/Microsoft.OpenApi.Hidi.Tests/check-nuget-package-published.Tests.ps1

File renamed without changes.

0 commit comments

Comments
 (0)