You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🪲 [Fix]: Fix test and container loading function to also process tests root folder (#35)
## Description
This pull request includes several improvements and new features to
enhance the robustness and functionality of the PowerShell scripts. The
key changes involve adding retry mechanisms for module installations,
introducing a new function to process test directories, and updating
existing scripts to use these new functionalities.
### Enhancements to module installation:
*
[`.github/workflows/Action-Test.yml`](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4L232-R251):
Added a retry mechanism for installing the `Markdown` module to handle
potential installation failures more gracefully.
*
[`scripts/exec.ps1`](diffhunk://#diff-9565c9ed6189efecf687222ac63d0ec9702c9708f75a02f7d9d9de9f86ae37a0L7-R8):
Replaced direct module installations with the new
`Install-PSResourceWithRetry` function to ensure reliable installations.
[[1]](diffhunk://#diff-9565c9ed6189efecf687222ac63d0ec9702c9708f75a02f7d9d9de9f86ae37a0L7-R8)
[[2]](diffhunk://#diff-9565c9ed6189efecf687222ac63d0ec9702c9708f75a02f7d9d9de9f86ae37a0L61-R58)
*
[`scripts/init.ps1`](diffhunk://#diff-f47ceebe9ade2bb55cede031de8267e9c87b09336a93fcd557c02c1f488554b6L5-R6):
Updated to use `Install-PSResourceWithRetry` for installing required
modules, ensuring retries on failure.
### New function for processing test directories:
*
[`scripts/Helpers.psm1`](diffhunk://#diff-acb1351e3ba396afa6a397b0bd44b5d8ed3ffeb97a3f3ef3633e9cfd6cacf11aR1113-R1318):
Introduced `Invoke-ProcessTestDirectory` to scan directories for
container and test files, process them accordingly, and support
recursive processing.
### Directory and path handling improvements:
*
[`scripts/exec.ps1`](diffhunk://#diff-9565c9ed6189efecf687222ac63d0ec9702c9708f75a02f7d9d9de9f86ae37a0L24-R21):
Changed the temporary directory name from 'temp' to '.temp' for better
organization.
*
[`scripts/init.ps1`](diffhunk://#diff-f47ceebe9ade2bb55cede031de8267e9c87b09336a93fcd557c02c1f488554b6L184-R198):
Updated the script to create a '.temp' directory for container output
and utilize `Invoke-ProcessTestDirectory` for processing test
directories.
### Additional changes:
*
[`tests/1-Simple-Failure/data/Test.Data.ps1`](diffhunk://#diff-170528ba3d6e6898a263b83dd935f3bc4954ed8f98435b8e66f23df7772fd20fR1):
Added a mock test data file.
## Type of change
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [ ] 📖 [Docs]
- [x] 🪲 [Fix]
- [ ] 🩹 [Patch]
- [ ] ⚠️ [Security fix]
- [ ] 🚀 [Feature]
- [ ] 🌟 [Breaking change]
## Checklist
<!-- Use the check-boxes [x] on the options that are relevant. -->
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
0 commit comments