Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created June 8, 2018 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinyoo/5631c5a4f76d1fa8ad78c9dd6d15eea6 to your computer and use it in GitHub Desktop.
Save justinyoo/5631c5a4f76d1fa8ad78c9dd6d15eea6 to your computer and use it in GitHub Desktop.
ARM Template Lifecycle Management: DOs and DON'Ts
Describe "Logic App Deployment Tests" {
Context "When Logic App deployed with parameters" {
$output = Test-AzureRmResourceGroupDeployment `
-ResourceGroupName $ResourceGroupName `
-TemplateFile $TemplateFile `
-TemplateParameterObject $Parameters `
-ErrorAction Stop `
5>&1
$result = (($output[32] -split "Body:")[1] | ConvertFrom-Json).properties
It "Should be deployed successfully" {
$result.provisioningState | Should -Be "Succeeded"
}
It "Should have name of" {
$expected = $Parameters.LogicAppName1 + "-" + $Parameters.LogicAppName2
$resource = $result.validatedResources[0]
$resource.name | Should -Be $expected
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment