Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Modules] Added itempotency to tests [1/5] #4210

Merged
merged 6 commits into from
Nov 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/analysis-services/server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "17464709928355207715"
"version": "0.23.1.45101",
"templateHash": "11444956126966610005"
},
"name": "Analysis Services Servers",
"description": "This module deploys an Analysis Services Server.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}'
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}'
Expand Down Expand Up @@ -117,4 +118,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}'
Expand Down Expand Up @@ -117,4 +118,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
publisherEmail: 'apimgmt-noreply@mail.windowsazure.com'
publisherName: '${namePrefix}-az-amorg-x-001'
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -216,4 +217,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -216,4 +217,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -96,4 +97,4 @@ module testDeployment '../../../main.bicep' = {
userAssignedIdentityResourceId: nestedDependencies.outputs.managedIdentityResourceId
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -121,4 +122,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -74,4 +75,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -121,4 +122,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
tags: {
Expand All @@ -71,4 +72,4 @@ module testDeployment '../../../main.bicep' = {
}
]
}
}
}]
7 changes: 4 additions & 3 deletions modules/app/container-app/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
tags: {
Expand Down Expand Up @@ -106,4 +107,4 @@ module testDeployment '../../../main.bicep' = {
}
]
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
name: '${namePrefix}${serviceShort}001'
tags: {
Expand Down Expand Up @@ -106,4 +107,4 @@ module testDeployment '../../../main.bicep' = {
}
]
}
}
}]
4 changes: 2 additions & 2 deletions modules/app/managed-environment/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "5686402227763337334"
"version": "0.23.1.45101",
"templateHash": "17510800738142190994"
},
"name": "App ManagedEnvironments",
"description": "This module deploys an App Managed Environment (also known as a Container App Environment).",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
logAnalyticsWorkspaceResourceId: nestedDependencies.outputs.logAnalyticsWorkspaceResourceId
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand All @@ -69,4 +70,4 @@ module testDeployment '../../../main.bicep' = {
Env: 'test'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand All @@ -69,4 +70,4 @@ module testDeployment '../../../main.bicep' = {
Env: 'test'
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ module nestedDependencies 'dependencies.bicep' = {
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand All @@ -65,4 +66,4 @@ module testDeployment '../../../main.bicep' = {
]
}
}
}
}]
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,10 @@ module diagnosticDependencies '../../../../../.shared/.templates/diagnostic.depe
// Test Execution //
// ============== //

module testDeployment '../../../main.bicep' = {
@batchSize(1)
module testDeployment '../../../main.bicep' = [for iteration in [ 'init', 'idem' ]: {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}'
name: '${uniqueString(deployment().name, location)}-test-${serviceShort}-${iteration}'
params: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -258,4 +259,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
Loading