-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
enhancementNew feature or requestNew feature or requesttestingTest infrastructure and test filesTest infrastructure and test files
Description
Issue Description
The Invoke-VerifiedDownload function in scripts/lib/Get-VerifiedDownload.ps1 has 0% test coverage. This 40-line function orchestrates file downloads with SHA256 verification but is completely untested.
Current state:
- File coverage: 29% line (22/76)
- Pure helper functions are well-tested (7 Describe blocks)
- Main orchestration function
Invoke-VerifiedDownloadhas no tests
Acceptance criteria:
- Add Describe block for
Invoke-VerifiedDownloadinGet-VerifiedDownload.Tests.ps1 - Mock
Invoke-WebRequest,Expand-Archive, and file system operations - Test success path with valid hash
- Test failure path with hash mismatch
- Test skip path when valid file already exists
- Achieve ≥80% line coverage for the file
Estimated coverage improvement: 29% → ~82%
Additional Context
The existing test file pattern uses InModuleScope with mocked cmdlets. Follow the same approach used for Test-ExistingFileValid and Get-DownloadTargetPath tests.
This is part of a broader effort to increase unit test coverage from ~42% to ~85-90%.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesttestingTest infrastructure and test filesTest infrastructure and test files