Skip to content

Commit

Permalink
feat: Removed enforcement of UDT schemas for pattern modules (Azure#1832
Browse files Browse the repository at this point in the history
)

## Description

Skipping UDT tests for Pattern modules

Closes Azure#1749

Example Resource (note the UDT schema tests)

![image](https://github.com/Azure/bicep-registry-modules/assets/5365358/62e914f8-0692-48af-8273-ff193538e03e)


Example Pattern (note the lack of UDT schema tests)

![image](https://github.com/Azure/bicep-registry-modules/assets/5365358/190a0562-14d4-4209-8604-37d6dff76a35)


## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.ptn.security.security-center](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.ptn.security.security-center.yml/badge.svg?branch=users%2Falsehr%2F1749_skipRoleTypePtn&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.ptn.security.security-center.yml)
|
|
[![avm.res.aad.domain-service](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.aad.domain-service.yml/badge.svg?branch=users%2Falsehr%2F1749_skipRoleTypePtn&event=workflow_dispatch)](https://github.com/Azure/bicep-registry-modules/actions/workflows/avm.res.aad.domain-service.yml)
|

## 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
  • Loading branch information
AlexanderSehr authored and Agazoth committed May 13, 2024
1 parent b72e39d commit f8654ff
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,11 @@ Describe 'Module tests' -Tag 'Module' {
$udtSpecificTestCases = [System.Collections.ArrayList] @() # Specific UDT test cases for singular UDTs (e.g. tags)
foreach ($moduleFolderPath in $moduleFolderPaths) {

if ($moduleFolderPath -match '[\/|\\]avm[\/|\\]ptn[\/|\\]') {
# Skip UDT interface tests for ptn modules
continue
}

$resourceTypeIdentifier = ($moduleFolderPath -split '[\/|\\]{1}avm[\/|\\]{1}(res|ptn)[\/|\\]{1}')[2] -replace '\\', '/' # 'avm/res|ptn/<provider>/<resourceType>' would return '<provider>/<resourceType>'
$templateFilePath = Join-Path $moduleFolderPath 'main.bicep'
$templateFileContent = $builtTestFileMap[$templateFilePath]
Expand Down

0 comments on commit f8654ff

Please sign in to comment.