Skip to content

Commit

Permalink
[Modules] Added itempotency to tests [3/5] (#4212)
Browse files Browse the repository at this point in the history
* Updated batch 3

* Update to latest

* Refreshed templates
  • Loading branch information
AlexanderSehr authored Nov 18, 2023
1 parent 5e17d99 commit d6a3486
Show file tree
Hide file tree
Showing 32 changed files with 130 additions and 105 deletions.
24 changes: 12 additions & 12 deletions modules/key-vault/vault/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": "3329640314478719515"
"version": "0.23.1.45101",
"templateHash": "4234651984682220679"
},
"name": "Key Vaults",
"description": "This module deploys a Key Vault.",
Expand Down Expand Up @@ -705,8 +705,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "2131300650084383528"
"version": "0.23.1.45101",
"templateHash": "5636934877550105255"
},
"name": "Key Vault Access Policies",
"description": "This module deploys a Key Vault Access Policy.",
Expand Down Expand Up @@ -843,8 +843,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "3223693327720603920"
"version": "0.23.1.45101",
"templateHash": "14408031654729406286"
},
"name": "Key Vault Secrets",
"description": "This module deploys a Key Vault Secret.",
Expand Down Expand Up @@ -1138,8 +1138,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "2953672245031093442"
"version": "0.23.1.45101",
"templateHash": "6556101606252284471"
},
"name": "Key Vault Keys",
"description": "This module deploys a Key Vault Key.",
Expand Down Expand Up @@ -1508,8 +1508,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "12078057657290521609"
"version": "0.23.1.45101",
"templateHash": "6873008238043407177"
},
"name": "Private Endpoints",
"description": "This module deploys a Private Endpoint.",
Expand Down Expand Up @@ -1911,8 +1911,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "16391702514342252839"
"version": "0.23.1.45101",
"templateHash": "17578977753131828304"
},
"name": "Private Endpoint Private DNS Zone Groups",
"description": "This module deploys a Private Endpoint Private DNS Zone Group.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,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}002'
Expand Down Expand Up @@ -131,4 +132,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
7 changes: 4 additions & 3 deletions modules/key-vault/vault/tests/e2e/defaults/main.test.bicep
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}002'
// Only for testing purposes
enablePurgeProtection: false
}
}
}]
7 changes: 4 additions & 3 deletions modules/key-vault/vault/tests/e2e/max/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,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}002'
Expand Down Expand Up @@ -186,4 +187,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
7 changes: 4 additions & 3 deletions modules/key-vault/vault/tests/e2e/pe/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,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 @@ -134,4 +135,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
7 changes: 4 additions & 3 deletions modules/key-vault/vault/tests/e2e/waf-aligned/main.test.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,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}002'
Expand Down Expand Up @@ -186,4 +187,4 @@ module testDeployment '../../../main.bicep' = {
Role: 'DeploymentValidation'
}
}
}
}]
8 changes: 4 additions & 4 deletions modules/kubernetes-configuration/extension/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "5002606439705018990"
"version": "0.23.1.45101",
"templateHash": "18265527122738367400"
},
"name": "Kubernetes Configuration Extensions",
"description": "This module deploys a Kubernetes Configuration Extension.",
Expand Down Expand Up @@ -167,8 +167,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "6686104224333946371"
"version": "0.23.1.45101",
"templateHash": "8985718648814286209"
},
"name": "Kubernetes Configuration Flux Configurations",
"description": "This module deploys a Kubernetes Configuration Flux Configuration.",
Expand Down
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: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand All @@ -58,4 +59,4 @@ module testDeployment '../../../main.bicep' = {
releaseNamespace: 'flux-system'
releaseTrain: 'Stable'
}
}
}]
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: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -81,4 +82,4 @@ module testDeployment '../../../main.bicep' = {
}
]
}
}
}]
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: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -81,4 +82,4 @@ module testDeployment '../../../main.bicep' = {
}
]
}
}
}]
4 changes: 2 additions & 2 deletions modules/kubernetes-configuration/flux-configuration/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.22.6.54827",
"templateHash": "6686104224333946371"
"version": "0.23.1.45101",
"templateHash": "8985718648814286209"
},
"name": "Kubernetes Configuration Flux Configurations",
"description": "This module deploys a Kubernetes Configuration Flux Configuration.",
Expand Down
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 @@ -68,4 +69,4 @@ module testDeployment '../../../main.bicep' = {
url: 'https://github.com/mspnp/aks-baseline'
}
}
}
}]
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 @@ -78,4 +79,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: {
enableDefaultTelemetry: enableDefaultTelemetry
name: '${namePrefix}${serviceShort}001'
Expand Down Expand Up @@ -78,4 +79,4 @@ module testDeployment '../../../main.bicep' = {
}
}
}
}
}]
7 changes: 4 additions & 3 deletions modules/logic/workflow/tests/e2e/max/main.test.bicep
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 @@ -133,4 +134,4 @@ module testDeployment '../../../main.bicep' = {
}
}
}
}
}]
7 changes: 4 additions & 3 deletions modules/logic/workflow/tests/e2e/waf-aligned/main.test.bicep
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 @@ -133,4 +134,4 @@ module testDeployment '../../../main.bicep' = {
}
}
}
}
}]
4 changes: 2 additions & 2 deletions modules/maintenance/maintenance-configuration/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": "14384863342174130916"
"version": "0.23.1.45101",
"templateHash": "17577108209638713488"
},
"name": "Maintenance Configurations",
"description": "This module deploys a Maintenance Configuration.",
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}001'
}
}
}]
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 Down Expand Up @@ -98,4 +99,4 @@ module testDeployment '../../../main.bicep' = {
}
}
}
}
}]
Loading

0 comments on commit d6a3486

Please sign in to comment.