Skip to content

Commit

Permalink
Merge branch 'Azure:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ReneHezser authored Dec 17, 2024
2 parents 523532c + c7b2fe3 commit 83c12ff
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions utilities/pipelines/staticValidation/compliance/module.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,17 @@ Describe 'File/folder tests' -Tag 'Modules' {
$file.Name | Should -BeExactly 'README.md'
}

# only avm/res/network/virtual-network/subnet is allowed to have a version.json file (PoC for child module publishing)
It '[<moduleFolderName>] Child module should not contain a [` version.json `] file.' -TestCases ($moduleFolderTestCases | Where-Object { (-Not $_.isTopLevelModule) -And ($_.moduleFolderName -ne 'network/virtual-network/subnet') }) {

param (
[string] $moduleFolderPath
)

$pathExisting = Test-Path (Join-Path -Path $moduleFolderPath 'version.json')
$pathExisting | Should -Be $false
}

It '[<moduleFolderName>] Module should contain a [` ORPHANED.md `] file only if orphaned.' -TestCases ($moduleFolderTestCases | Where-Object { $_.isTopLevelModule }) {

param(
Expand Down

0 comments on commit 83c12ff

Please sign in to comment.