-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Overview
Expand Pester test coverage for Phase 4 (Edge Cases) of issue #50 to ensure Publish-SFACertificates handles unusual scenarios gracefully.
Edge Cases to Test
- Test with expired certificates
- Test with special characters in certificate names (spaces, dashes, parentheses, etc.)
- Test archive folder filtering with various folder structures
- Test with very long filenames (approaching Windows path limits)
- Test with mixed case branch codes (JBa vs JBA)
- Test with missing or malformed branch mapping entries
- Test with duplicate certificate names across branches
Implementation Details
Add new test contexts to Tests/SFA/Publish-SFACertificates.Tests.ps1:
- Create temporary test certificates with edge case names
- Mock certificate store operations where needed
- Validate that script handles these cases without throwing unexpected errors
- Ensure report generation captures edge case scenarios
Acceptance Criteria
- All edge case tests pass with Pester 5.7.1
- Test coverage includes at least 5 of the 7 scenarios listed above
- Tests are repeatable and don't require external dependencies
- Documentation in test file explains each edge case and expected behavior
Related Issue
Resolves Phase 4 of #50: Debug SFA Certificate Distribution Issues
Copilot