Repository navigation
fix(hidi): place Pester test inside its physical test project - #896
Merged
Gavin Barron (gavinbarron) merged 1 commit intoOct 9, 2026
Merged
Gavin Barron (gavinbarron) merged 1 commit into
Gavin Barron (gavinbarron) merged 1 commit into
Conversation
Relocate the unchanged NuGet helper Pester suite into the physical Hidi test project so SonarScanner assigns it to module test inputs. Remove the ineffective virtual link and update the workflow and documented invocation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: d8b2d595-33d1-4ed7-a6fa-047f6ca57a36
|
Peter Ombwa (peombwa)
approved these changes
Oct 9, 2026
Gavin Barron (gavinbarron)
deleted the
gavinbarron-hidi-pester-ownership-correction
branch
October 9, 2026 22:28
12 of 19 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
test/scripts/check-nuget-package-published.Tests.ps1totest/Microsoft.OpenApi.Hidi.Tests/check-nuget-package-published.Tests.ps1.None Include/ virtualLink; SDK defaultNoneitems now discover the physically contained test.Run.Pathand the documented invocation.The virtual-link fix merged in #894 did not establish ownership: SonarScanner 11.3.0 requires physical containment when assigning additional files to their closest project. The old sibling path became root source code despite the Hidi project being classified as Test. Both locations have the same directory depth, so the test's existing
../../scriptshelper reference is unchanged.Validation
48aa0325414e6a58ce15373e1538b2ec4115ae89; no body/assertion edits.GenerateResultonly: actualProjectInfo.xmlreports Hidi Test,FilesToAnalyzecontains Pester, generated properties assign Pester only to521CDCFF-1E62-4396-9266-7CAA99205969.sonar.tests(lines 510-511), not rootsonar.sources. Helper remains only rootsonar.sources(line 15); all 10 Hidi and 116 OData C# test files remain module tests.Actual PR-head Sonar evidence
PR-triggered Sonar run 37971809195 succeeded at head
20ca498d58cb10673ec34901b1d6cc19c612c6cb. Sonar's PR API reports that same commit and the relocated PowerShell Pester component as UTS, with no coverage measures; no matching Pester source component remains. Quality gate: OK. The real scanner log lists Pester under Hidi module Test paths and explicitly ignores its duplication because it is a test file. This is substantive ownership proof, not just a metadata-only green check.That same remote run passed 24 Pester / 107 Hidi / 1,279 OData tests, measured 38/38 helper lines, and imported generic coverage for 1 file. PR changed-file analysis omits the unchanged helper from its component tree; exact PR helper component/measure requests return 404, as expected. Separately, prior full scan 37968835374 at
5ab3d0629ff60fcebacf069985869b98b79b5ab4proves the helper FIL, 100% coverage, 38 eligible, 0 uncovered. Its helper blobfea22f1c2f89ac949f1fc62d95d04a751ecd5dc3is identical at this PR head. Those prior-full-scan metrics are not presented as PR-head API metrics. Combined with actual PR UTS, exact-head test/coverage logs and actual offline root-source assignment, classification proof is complete; no additional full scan is needed. Noworkflow_dispatchor source changes were used to force unchanged-helper metrics into the PR view.Review readiness and scope
All PR checks are green, including CodeQL, ADO, Sonar, CI, Hidi Docker and Windows executable checks. Normal review approval is still required; no auto-merge or admin merge.
No coverage fabrication, exclusions, threshold changes, manual source/test properties, scanner workflow diagnostics, runtime/helper/publisher changes, or release-please changes. Existing ESRP, Docker authentication, signing/version/public-only settings and disabled publishers are preserved. Normal PR targeting
main.