Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add VM AZ Parameter Test (#1334)
## Description This pull request primarily introduces a new unit test in the `avm/res/compute/virtual-machine/tests/unit/az.tests.ps1` file. The unit test ensures that the Availability Zone parameter in the VM Module does not have a default value set. Key changes include: * [`avm/res/compute/virtual-machine/tests/unit/az.tests.ps1`](diffhunk://#diff-709a50b14d616bcd12c7ca2e17421ba839293f79ba97d0bee05070ba38cadf56R1-R20): Added a new parameter `$repoRootPath` which is optional. Also, added a script to import the `Get-IsParameterRequired.ps1` helper script from the shared scripts directory. * [`avm/res/compute/virtual-machine/tests/unit/az.tests.ps1`](diffhunk://#diff-709a50b14d616bcd12c7ca2e17421ba839293f79ba97d0bee05070ba38cadf56R1-R20): Added a `BeforeAll` block that reads the content of `main.json` into a hashtable. * [`avm/res/compute/virtual-machine/tests/unit/az.tests.ps1`](diffhunk://#diff-709a50b14d616bcd12c7ca2e17421ba839293f79ba97d0bee05070ba38cadf56R1-R20): Introduced a new unit test under the `Describe` block titled 'Availability Zone Tests'. This test checks if the Availability Zone parameter in the VM Module has a default value set. If it does, the test fails. ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.res.compute.virtual-machine](https://github.com/jtracey93/bicep-registry-modules/actions/workflows/avm.res.compute.virtual-machine.yml/badge.svg)](https://github.com/jtracey93/bicep-registry-modules/actions/workflows/avm.res.compute.virtual-machine.yml) | > Failure is expected as the module is currently not complaint ## Type of Change <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] Update to CI Environment or utlities (Non-module effecting changes) - [ ] Azure Verified Module updates: - [ ] Bugfix containing backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation ## Checklist - [x] I'm sure there are no other open Pull Requests for the same update/change - [ ] I have run `Set-AVMModule` locally to generate the supporting module files. - [ ] My corresponding pipelines / checks run clean and green without any errors or warnings <!-- Please keep up to day with the contribution guide at https://aka.ms/avm/contribute/bicep -->
- Loading branch information