You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert-ThrowsContains { Get-AzureRmIntegrationAccountAgreement-ResourceGroupName "Random83da135"-IntegrationAccountName "DoesNotMatter"-AgreementName "DoesNotMatter" } "Resource group 'Random83da135' could not be found."
Assert-ThrowsContains { Get-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName "Random83da135"-Name "DoesNotMatter"-AgreementName "DoesNotMatter" } "Resource group 'Random83da135' could not be found."
62
+
# This error string is less than ideal due to AutoRest bug https://github.com/Azure/autorest/issues/2022
63
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName "Random83da135"-Name "DoesNotMatter"-AgreementName "DoesNotMatter" } "Operation returned an invalid status code 'NotFound'"
Assert-ThrowsContains { Get-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name "Random83da135"-AgreementName "DoesNotMatter" } "The Resource 'Microsoft.Logic/integrationAccounts/Random83da135' under resource group 'IntegrationAccountPsCmdletTest' was not found."
69
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name "Random83da135"-AgreementName "DoesNotMatter" } "Operation returned an invalid status code 'NotFound'"
@@ -89,7 +90,7 @@ function Test-GetIntegrationAccountGeneratedControlNumber
89
90
# So working this around by using ARM resource cmdlet to create a dummy entry.
90
91
91
92
# Before the workaround the control number containing session ressource cannot be found in the integration account.
92
-
Assert-ThrowsContains { Get-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountX12AgreementName } "could not be found in integration account"
93
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountX12AgreementName } "Operation returned an invalid status code 'NotFound'"
93
94
94
95
# Now we create one with the legacy raw control number content. This cmdlet will intentionally fail to deserialize: it is meant only to operate on new control numbers that have been replicated for the purpose of disaster recovery.
# Verify inserting new control number records is not allowed
137
-
Assert-ThrowsContains { Set-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumber "789" } "could not be found in integration account"
138
+
Assert-ThrowsContains { Set-AzureRmIntegrationAccountGeneratedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumber "789" } "Operation returned an invalid status code 'NotFound'"
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName "Random83da135"-Name "DoesNotMatter"-AgreementName "DoesNotMatter"-controlNumberValue "DoesNotMatter" } "Resource group 'Random83da135' could not be found."
63
+
# This error string is less than ideal due to AutoRest bug https://github.com/Azure/autorest/issues/2022
64
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName "Random83da135"-Name "DoesNotMatter"-AgreementName "DoesNotMatter"-controlNumberValue "DoesNotMatter" } "Operation returned an invalid status code 'NotFound'"
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name "Random83da135"-AgreementName "DoesNotMatter"-ControlNumberValue "DoesNotMatter" } "The Resource 'Microsoft.Logic/integrationAccounts/Random83da135' under resource group 'IntegrationAccountPsCmdletTest' was not found."
70
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name "Random83da135"-AgreementName "DoesNotMatter"-ControlNumberValue "DoesNotMatter" } "Operation returned an invalid status code 'NotFound'"
@@ -90,7 +91,7 @@ function Test-GetIntegrationAccountReceivedIcn
90
91
# So working this around by using ARM resource cmdlet to create a dummy entry.
91
92
92
93
# Before the workaround the control number containing session ressource cannot be found in the integration account.
93
-
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountX12AgreementName-ControlNumberValue "1000" } "could not be found in integration account"
94
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountX12AgreementName-ControlNumberValue "1000" } "Operation returned an invalid status code 'NotFound'"
94
95
95
96
# Now we create one with the legacy raw control number content. This cmdlet will intentionally fail to deserialize: it is meant only to operate on new control numbers that have been replicated for the purpose of disaster recovery.
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumberValue "1000" } "could not be found in integration account"
135
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumberValue "1000" } "Operation returned an invalid status code 'NotFound'"
135
136
136
137
# Verify removing non-existing control number records is allowed.
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumberValue "1000" } "could not be found in integration account"
146
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumberValue "1000" } "Operation returned an invalid status code 'NotFound'"
146
147
147
148
Assert-ThrowsContains { Remove-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName } "Cannot process command because of one or more missing mandatory parameters: ControlNumberValue."
148
149
@@ -178,7 +179,7 @@ function Test-UpdateIntegrationAccountReceivedIcn
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumberValue "1000" } "could not be found in integration account"
182
+
Assert-ThrowsContains { Get-AzureRmIntegrationAccountReceivedIcn-ResourceGroupName $resourceGroup.ResourceGroupName-Name $integrationAccountName-AgreementName $integrationAccountAgreementName-ControlNumberValue "1000" } "Operation returned an invalid status code 'NotFound'"
0 commit comments