Skip to content

Commit

Permalink
Small fix for nullkey
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSehr committed Feb 22, 2025
1 parent 58f8ce2 commit 9d8d1bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ Describe 'Module tests' -Tag 'Module' {
$hasMatchingParameter = $templateFileContent.parameters.managedIdentities.'$ref' -match 'managedIdentit'

$matchingTypeKey = $templateFileContent.definitions.Keys | Where-Object { $_ -match 'managedIdentit' }
$hasSystemAssignedInType = $templateFileContent.definitions.$matchingTypeKey.properties.keys -contains 'systemAssigned'
$hasSystemAssignedInType = $templateFileContent.definitions.($matchingTypeKey ?? '').properties.keys -contains 'systemAssigned'

if ($hasMatchingParameter -and $hasSystemAssignedInType) {
$templateFileContent.outputs.Keys | Should -Contain 'systemAssignedMIPrincipalId' -Because 'The AVM specs require a this output. For information please review the [AVM Specs](https://azure.github.io/Azure-Verified-Modules/specs/bcp/res/interfaces/#managed-identities).'
Expand Down

0 comments on commit 9d8d1bd

Please sign in to comment.