@@ -188,7 +188,23 @@ function Test-CreateAndGetLogicAppUsingDefinitionWithActions
188
188
$workflow3 = Get-AzLogicApp - ResourceGroupName $resourceGroupName - Name $workflowName - Version $workflow1.Version
189
189
Assert-NotNull $workflow3
190
190
191
- # Test 4: Get non-existing logic app using get cmdlet
191
+ # Test 4: Get all workflows in ResourceGroup
192
+ $workflow4 = Get-AzLogicApp - ResourceGroupName $resourceGroupName
193
+ Assert-NotNull $workflow4
194
+ Assert-True { $workflow4.Length -ge 1 }
195
+
196
+ # Test 5: Get all workflows in Subscription
197
+ $workflow5 = Get-AzLogicApp
198
+ Assert-NotNull $workflow5
199
+ Assert-True { $workflow5.Length -ge 1 }
200
+
201
+ # Test 6: Get workflow with just name parameter
202
+ # refortie (1/31/19): TODO Test is disabled for now, we only return the first page on get logic app by subscription
203
+ # $workflow6 = Get-AzLogicApp -Name $workflowName
204
+ # Assert-NotNull $workflow6
205
+ # Assert-True { $workflow6.Length -ge 1 }
206
+
207
+ # Test 7: Get non-existing logic app using get cmdlet
192
208
try
193
209
{
194
210
Get-AzLogicApp - ResourceGroupName $resourceGroupName - Name " InvalidWorkflow"
@@ -198,7 +214,7 @@ function Test-CreateAndGetLogicAppUsingDefinitionWithActions
198
214
Assert-AreEqual $_.Exception.Message " The Resource 'Microsoft.Logic/workflows/InvalidWorkflow' under resource group '$resourceGroupName ' was not found."
199
215
}
200
216
201
- Remove-AzLogicApp - ResourceGroupName $resourceGroup.ResourceGroupName - Name $workflowName - Force
217
+ Remove-AzLogicApp - ResourceGroupName $resourceGroup.ResourceGroupName - Name $workflowName - Force
202
218
}
203
219
204
220
<#
@@ -302,7 +318,17 @@ function Test-ValidateLogicApp
302
318
$definition = [IO.File ]::ReadAllText($definitionFilePath )
303
319
Test-AzLogicApp - ResourceGroupName $resourceGroup.ResourceGroupName - Name $workflowName - Location $location - Definition $definition - ParameterFilePath $parameterFilePath
304
320
305
- Remove-AzLogicApp - ResourceGroupName $resourceGroupName - Name $workflowName - Force
321
+ # Test 3: Failure for an invalid definition.
322
+ try
323
+ {
324
+ Test-AzLogicApp - ResourceGroupName $resourceGroupName - Name $workflowName - Location $location - Definition ' {}'
325
+ }
326
+ catch
327
+ {
328
+ Assert-AreEqual $_.Exception.Message " The request content is not valid and could not be deserialized: 'Required property '`$ schema' not found in JSON. Path 'properties.definition', line 4, position 20.'."
329
+ }
330
+
331
+ Remove-AzLogicApp - ResourceGroupName $resourceGroupName - Name $workflowName - Force
306
332
}
307
333
308
334
<#
0 commit comments