Skip to content

Commit

Permalink
Telemetry (#1678)
Browse files Browse the repository at this point in the history
## Description

Bugfix for latest Static Validation Change

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes #123
Fixes #456
Closes #123
Closes #456
-->

## Pipeline Reference

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

| Pipeline |
| -------- |
|
[![avm.res.analysis-services.server](https://github.com/ChrisSidebotham/bicep-registry-modules/actions/workflows/avm.res.analysis-services.server.yml/badge.svg?branch=telemetry)](https://github.com/ChrisSidebotham/bicep-registry-modules/actions/workflows/avm.res.analysis-services.server.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

## Checklist

- [ ] 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
ChrisSidebotham authored Apr 12, 2024
1 parent 07515bd commit fadfdff
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ Describe 'Module tests' -Tag 'Module' {
$templateResources = $templateFileContent.resources.Keys | ForEach-Object { $templateFileContent.resources[$_] }
}

$telemetryDeployment = $templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '46d3xbcp*' } # The AVM telemetry prefix
$telemetryDeployment = $templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '*46d3xbcp*' } # The AVM telemetry prefix
$telemetryDeployment | Should -Not -BeNullOrEmpty -Because 'A telemetry resource with name prefix [46d3xbcp] should be present in the template'
}

Expand All @@ -850,7 +850,7 @@ Describe 'Module tests' -Tag 'Module' {
$templateResources = $templateFileContent.resources.Keys | ForEach-Object { $templateFileContent.resources[$_] }
}

$telemetryDeployment = $templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '46d3xbcp*' } # The AVM telemetry prefix
$telemetryDeployment = $templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '*46d3xbcp*' } # The AVM telemetry prefix

if (-not $telemetryDeployment) {
Set-ItResult -Skipped -Because 'Skipping this test as telemetry was not implemented in template'
Expand All @@ -873,7 +873,7 @@ Describe 'Module tests' -Tag 'Module' {
$templateResources = $templateFileContent.resources.Keys | ForEach-Object { $templateFileContent.resources[$_] }
}

$telemetryDeployment = $templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '46d3xbcp*' } # The AVM telemetry prefix
$telemetryDeployment = $templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '*46d3xbcp*' } # The AVM telemetry prefix

if (-not $telemetryDeployment) {
Set-ItResult -Skipped -Because 'Skipping this test as telemetry was not implemented in template'
Expand Down Expand Up @@ -927,7 +927,7 @@ Describe 'Module tests' -Tag 'Module' {
} else {
$templateResources = $templateFileContent.resources.Keys | ForEach-Object { $templateFileContent.resources[$_] }
}
$telemetryDeploymentName = ($templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '46d3xbcp*' }).name # The AVM telemetry prefix
$telemetryDeploymentName = ($templateResources | Where-Object { $_.condition -like '*telemetry*' -and $_.name -like '*46d3xbcp*' }).name # The AVM telemetry prefix
$telemetryDeploymentName | Should -Match "$expectedTelemetryIdentifier"
}
}
Expand Down

0 comments on commit fadfdff

Please sign in to comment.