Releases.Tests.ps1 contains one It block that exercises Get-GitHubRelease piping into Get-GitHubReleaseAsset — a valid pipeline-input code path worth testing. Today that block uses the public third-party repository ryanoasis/nerd-fonts as its data source.
Request
What is confusing or missing
The test has no connection to nerd-fonts as a concept. The repository is used purely because it has a release with many large assets attached — a property that any repository with release assets has. Using an external repository introduces a class of failures that have nothing to do with the module under test:
- The release, its tag, or its assets could be removed or renamed at any time by a third party.
- GitHub rate-limits unauthenticated and authenticated requests. A release with many large assets puts extra pressure on the shared secondary rate limit budget that #541 was specifically designed to protect.
- The test is blocked in air-gapped or restricted environments.
- The assertion is implicitly coupled to the shape of nerd-fonts releases (many assets, specific content types) — that shape can change.
The test should use assets already uploaded to the shared test repository during the same context BeforeAll, which the Release Assets sub-context creates specifically for this purpose. Those assets exist for the full duration of the test run and cover all content types needed to exercise the pipeline path.
Acceptance criteria
- The
Get-GitHubReleaseAsset - Gets assets from release using pipeline test no longer references any repository outside PSModule or the test account family (psmodule-test-org, psmodule-test-org2, etc.).
- The test continues to verify that a
Get-GitHubRelease result can be piped into Get-GitHubReleaseAsset and that the returned collection matches the [GitHubReleaseAsset] type contract.
- The test uses assets from the shared test repository that were already uploaded in the same
Release Assets context BeforeAll.
- No new API calls to third-party repositories are made anywhere in the test suite.
Technical decisions
Replacement source: The Release Assets sub-context in Releases.Tests.ps1 already uploads several assets (TextFile.txt, Documentation.md, Config.json, Data.xml, Records.csv, a ZIP) to the latest release on $repo in its BeforeAll. That release is available as $release within the context. The pipeline test should call Get-GitHubRelease -Owner $Owner -Repository $repo and pipe to Get-GitHubReleaseAsset — identical pipeline semantics, internal data source.
Assertion adjustment: The existing assertions check $assets.Count | Should -BeGreaterThan 0 and validate each asset's type contract. The count and content-type values will reflect the test-controlled assets rather than nerd-fonts, so the count assertion stays valid (-BeGreaterThan 0) or can be made exact if desired. The per-asset assertions are already property-shape checks and require no changes.
No structural change needed: The replacement is a one-line change to the Get-GitHubRelease call — swap Owner ryanoasis -Repository nerd-fonts for -Owner $Owner -Repository $repo. The rest of the It block is unchanged.
Implementation plan
Core changes
Verification
Releases.Tests.ps1contains oneItblock that exercisesGet-GitHubReleasepiping intoGet-GitHubReleaseAsset— a valid pipeline-input code path worth testing. Today that block uses the public third-party repositoryryanoasis/nerd-fontsas its data source.Request
What is confusing or missing
The test has no connection to nerd-fonts as a concept. The repository is used purely because it has a release with many large assets attached — a property that any repository with release assets has. Using an external repository introduces a class of failures that have nothing to do with the module under test:
The test should use assets already uploaded to the shared test repository during the same context
BeforeAll, which theRelease Assetssub-context creates specifically for this purpose. Those assets exist for the full duration of the test run and cover all content types needed to exercise the pipeline path.Acceptance criteria
Get-GitHubReleaseAsset - Gets assets from release using pipelinetest no longer references any repository outsidePSModuleor the test account family (psmodule-test-org,psmodule-test-org2, etc.).Get-GitHubReleaseresult can be piped intoGet-GitHubReleaseAssetand that the returned collection matches the[GitHubReleaseAsset]type contract.Release AssetscontextBeforeAll.Technical decisions
Replacement source: The
Release Assetssub-context inReleases.Tests.ps1already uploads several assets (TextFile.txt,Documentation.md,Config.json,Data.xml,Records.csv, a ZIP) to the latest release on$repoin itsBeforeAll. That release is available as$releasewithin the context. The pipeline test should callGet-GitHubRelease -Owner $Owner -Repository $repoand pipe toGet-GitHubReleaseAsset— identical pipeline semantics, internal data source.Assertion adjustment: The existing assertions check
$assets.Count | Should -BeGreaterThan 0and validate each asset's type contract. The count and content-type values will reflect the test-controlled assets rather than nerd-fonts, so the count assertion stays valid (-BeGreaterThan 0) or can be made exact if desired. The per-asset assertions are already property-shape checks and require no changes.No structural change needed: The replacement is a one-line change to the
Get-GitHubReleasecall — swapOwner ryanoasis -Repository nerd-fontsfor-Owner $Owner -Repository $repo. The rest of theItblock is unchanged.Implementation plan
Core changes
Get-GitHubRelease -Owner ryanoasis -Repository nerd-fontswithGet-GitHubRelease -Owner $Owner -Repository $repoin theGet-GitHubReleaseAsset - Gets assets from release using pipelinetest intests/Releases.Tests.ps1Verification
Itblock is inside theRelease Assetssub-context (so$releaseand$repoare in scope)