fog-azure-rm 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/lib/fog/azurerm/custom_fog_errors.rb +18 -0
  4. data/lib/fog/azurerm/utilities/general.rb +5 -5
  5. data/lib/fog/azurerm/version.rb +1 -1
  6. data/test/requests/application_gateway/test_check_ag_exists.rb +1 -1
  7. data/test/requests/application_gateway/test_create_or_update_application_gateway.rb +1 -1
  8. data/test/requests/application_gateway/test_delete_application_gateway.rb +1 -1
  9. data/test/requests/application_gateway/test_get_application_gateway.rb +1 -1
  10. data/test/requests/application_gateway/test_list_application_gateways.rb +1 -1
  11. data/test/requests/application_gateway/test_start_application_gateway.rb +1 -1
  12. data/test/requests/application_gateway/test_stop_application_gateway.rb +1 -1
  13. data/test/requests/compute/test_attach_data_disk_to_vm.rb +4 -4
  14. data/test/requests/compute/test_check_availability_set_exists.rb +1 -1
  15. data/test/requests/compute/test_check_managed_disk_exists.rb +1 -1
  16. data/test/requests/compute/test_check_vm_exists.rb +1 -1
  17. data/test/requests/compute/test_check_vm_extension_exists.rb +1 -1
  18. data/test/requests/compute/test_create_availability_set.rb +2 -2
  19. data/test/requests/compute/test_create_image.rb +1 -1
  20. data/test/requests/compute/test_create_or_update_managed_disk.rb +1 -1
  21. data/test/requests/compute/test_create_virtual_machine.rb +2 -2
  22. data/test/requests/compute/test_create_vm_extension.rb +1 -1
  23. data/test/requests/compute/test_deallocate_virtual_machine.rb +2 -2
  24. data/test/requests/compute/test_delete_availability_set.rb +1 -1
  25. data/test/requests/compute/test_delete_image.rb +1 -1
  26. data/test/requests/compute/test_delete_managed_disk.rb +1 -1
  27. data/test/requests/compute/test_delete_virtual_machine.rb +2 -2
  28. data/test/requests/compute/test_detach_data_disk_from_vm.rb +1 -1
  29. data/test/requests/compute/test_generalize_virtual_machine.rb +2 -2
  30. data/test/requests/compute/test_get_availability_set.rb +1 -1
  31. data/test/requests/compute/test_get_image.rb +1 -1
  32. data/test/requests/compute/test_get_managed_disk.rb +1 -1
  33. data/test/requests/compute/test_get_virtual_machine.rb +1 -1
  34. data/test/requests/compute/test_get_vm_extension.rb +1 -1
  35. data/test/requests/compute/test_get_vm_status.rb +1 -1
  36. data/test/requests/compute/test_grant_access_to_managed_disk.rb +1 -1
  37. data/test/requests/compute/test_list_availability_sets.rb +1 -1
  38. data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +2 -2
  39. data/test/requests/compute/test_list_managed_disks_by_rg.rb +1 -1
  40. data/test/requests/compute/test_list_managed_disks_in_subscription.rb +1 -1
  41. data/test/requests/compute/test_list_virtual_machines.rb +1 -1
  42. data/test/requests/compute/test_power_off_virtual_machine.rb +2 -2
  43. data/test/requests/compute/test_redeploy_virtual_machine.rb +2 -2
  44. data/test/requests/compute/test_restart_virtual_machine.rb +2 -2
  45. data/test/requests/compute/test_revoke_access_to_managed_disk.rb +1 -1
  46. data/test/requests/compute/test_start_virtual_machine.rb +2 -2
  47. data/test/requests/compute/test_update_vm_extension.rb +1 -1
  48. data/test/requests/dns/test_check_record_set_exists.rb +1 -1
  49. data/test/requests/dns/test_check_zone_exists.rb +1 -1
  50. data/test/requests/dns/test_create_record_set.rb +1 -1
  51. data/test/requests/dns/test_create_zone.rb +1 -1
  52. data/test/requests/dns/test_delete_record_set.rb +1 -1
  53. data/test/requests/dns/test_delete_zone.rb +1 -1
  54. data/test/requests/dns/test_get_record_set.rb +1 -1
  55. data/test/requests/dns/test_get_records_from_record_set.rb +1 -1
  56. data/test/requests/dns/test_get_zone.rb +1 -1
  57. data/test/requests/dns/test_list_record_sets.rb +1 -1
  58. data/test/requests/dns/test_list_zones.rb +1 -1
  59. data/test/requests/key_vault/test_check_vault_exists.rb +1 -1
  60. data/test/requests/key_vault/test_create_or_update_vault.rb +1 -1
  61. data/test/requests/key_vault/test_delete_vault.rb +1 -1
  62. data/test/requests/key_vault/test_get_vault.rb +1 -1
  63. data/test/requests/key_vault/test_list_vaults.rb +1 -1
  64. data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +1 -1
  65. data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +1 -1
  66. data/test/requests/network/test_add_subnets_in_virtual_network.rb +1 -1
  67. data/test/requests/network/test_attach_network_security_group_to_subnet.rb +1 -1
  68. data/test/requests/network/test_attach_resource_to_nic.rb +1 -1
  69. data/test/requests/network/test_attach_route_table_to_subnet.rb +1 -1
  70. data/test/requests/network/test_check_express_route_cir_auth_exists.rb +1 -1
  71. data/test/requests/network/test_check_express_route_circuit_exists.rb +1 -1
  72. data/test/requests/network/test_check_load_balancer_exists.rb +1 -1
  73. data/test/requests/network/test_check_local_net_gateway_exists.rb +1 -1
  74. data/test/requests/network/test_check_net_sec_group_exists.rb +1 -1
  75. data/test/requests/network/test_check_net_sec_rule_exists.rb +1 -1
  76. data/test/requests/network/test_check_network_interface_exists.rb +1 -1
  77. data/test/requests/network/test_check_public_ip_exists.rb +1 -1
  78. data/test/requests/network/test_check_subnet_exists.rb +1 -1
  79. data/test/requests/network/test_check_virtual_network_exists.rb +1 -1
  80. data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +1 -1
  81. data/test/requests/network/test_check_vnet_gateway_exists.rb +1 -1
  82. data/test/requests/network/test_create_express_route_circuit.rb +1 -1
  83. data/test/requests/network/test_create_express_route_circuit_authorization.rb +1 -1
  84. data/test/requests/network/test_create_express_route_circuit_peering.rb +1 -1
  85. data/test/requests/network/test_create_load_balancer.rb +1 -1
  86. data/test/requests/network/test_create_local_network_gateway.rb +1 -1
  87. data/test/requests/network/test_create_network_interface.rb +1 -1
  88. data/test/requests/network/test_create_or_update_network_security_group.rb +1 -1
  89. data/test/requests/network/test_create_or_update_network_security_rule.rb +1 -1
  90. data/test/requests/network/test_create_or_update_virtual_network.rb +1 -1
  91. data/test/requests/network/test_create_public_ip.rb +1 -1
  92. data/test/requests/network/test_create_subnet.rb +1 -1
  93. data/test/requests/network/test_create_virtual_network_gateway.rb +1 -1
  94. data/test/requests/network/test_create_virtual_network_gateway_connection.rb +1 -1
  95. data/test/requests/network/test_delete_express_route_circuit.rb +1 -1
  96. data/test/requests/network/test_delete_express_route_circuit_authorization.rb +1 -1
  97. data/test/requests/network/test_delete_express_route_circuit_peering.rb +1 -1
  98. data/test/requests/network/test_delete_load_balancer.rb +1 -1
  99. data/test/requests/network/test_delete_local_network_gateway.rb +1 -1
  100. data/test/requests/network/test_delete_network_interface.rb +1 -1
  101. data/test/requests/network/test_delete_network_security_group.rb +1 -1
  102. data/test/requests/network/test_delete_network_security_rule.rb +1 -1
  103. data/test/requests/network/test_delete_public_ip.rb +1 -1
  104. data/test/requests/network/test_delete_subnet.rb +1 -1
  105. data/test/requests/network/test_delete_virtual_network.rb +1 -1
  106. data/test/requests/network/test_delete_virtual_network_gateway.rb +1 -1
  107. data/test/requests/network/test_delete_virtual_network_gateway_connection.rb +1 -1
  108. data/test/requests/network/test_detach_network_security_group_from_subnet.rb +1 -1
  109. data/test/requests/network/test_detach_resource_from_nic.rb +1 -1
  110. data/test/requests/network/test_detach_route_table_from_subnet.rb +1 -1
  111. data/test/requests/network/test_get_connection_shared_key.rb +1 -1
  112. data/test/requests/network/test_get_express_route_circuit.rb +1 -1
  113. data/test/requests/network/test_get_express_route_circuit_authorization.rb +1 -1
  114. data/test/requests/network/test_get_express_route_circuit_peering.rb +1 -1
  115. data/test/requests/network/test_get_load_balancer.rb +1 -1
  116. data/test/requests/network/test_get_local_network_gateway.rb +1 -1
  117. data/test/requests/network/test_get_network_interface.rb +1 -1
  118. data/test/requests/network/test_get_network_security_group.rb +1 -1
  119. data/test/requests/network/test_get_network_security_rule.rb +1 -1
  120. data/test/requests/network/test_get_public_ip.rb +1 -1
  121. data/test/requests/network/test_get_subnet.rb +1 -1
  122. data/test/requests/network/test_get_virtual_network.rb +1 -1
  123. data/test/requests/network/test_get_virtual_network_gateway.rb +1 -1
  124. data/test/requests/network/test_get_virtual_network_gateway_connection.rb +1 -1
  125. data/test/requests/network/test_list_express_route_circuit_authorizations.rb +1 -1
  126. data/test/requests/network/test_list_express_route_circuit_peerings.rb +1 -1
  127. data/test/requests/network/test_list_express_route_circuits.rb +1 -1
  128. data/test/requests/network/test_list_express_route_service_providers.rb +1 -1
  129. data/test/requests/network/test_list_load_balancers.rb +1 -1
  130. data/test/requests/network/test_list_local_network_gateways.rb +1 -1
  131. data/test/requests/network/test_list_network_interfaces.rb +1 -1
  132. data/test/requests/network/test_list_network_security_groups.rb +1 -1
  133. data/test/requests/network/test_list_network_security_rules.rb +1 -1
  134. data/test/requests/network/test_list_public_ips.rb +1 -1
  135. data/test/requests/network/test_list_subnets.rb +1 -1
  136. data/test/requests/network/test_list_virtual_network_gateway_connections.rb +1 -1
  137. data/test/requests/network/test_list_virtual_network_gateways.rb +1 -1
  138. data/test/requests/network/test_list_virtual_networks.rb +1 -1
  139. data/test/requests/network/test_list_virtual_networks_in_subscription.rb +1 -1
  140. data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +1 -1
  141. data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +1 -1
  142. data/test/requests/network/test_remove_subnets_from_virtual_network.rb +1 -1
  143. data/test/requests/network/test_reset_connection_shared_key.rb +1 -1
  144. data/test/requests/network/test_set_connection_shared_key.rb +1 -1
  145. data/test/requests/network/test_update_public_ip.rb +1 -1
  146. data/test/requests/resources/test_check_deployment_exists.rb +1 -1
  147. data/test/requests/resources/test_check_resource_group_exists.rb +1 -1
  148. data/test/requests/resources/test_create_deployment.rb +1 -1
  149. data/test/requests/resources/test_create_resource_group.rb +1 -1
  150. data/test/requests/resources/test_delete_deployment.rb +1 -1
  151. data/test/requests/resources/test_delete_resource_group.rb +1 -1
  152. data/test/requests/resources/test_delete_resource_tag.rb +1 -1
  153. data/test/requests/resources/test_get_deployment.rb +1 -1
  154. data/test/requests/resources/test_get_resource_group.rb +1 -1
  155. data/test/requests/resources/test_list_deployments.rb +1 -1
  156. data/test/requests/resources/test_list_resource_groups.rb +1 -1
  157. data/test/requests/resources/test_list_tagged_resources.rb +1 -1
  158. data/test/requests/resources/test_tag_resource.rb +1 -1
  159. data/test/requests/sql/test_create_or_update_database.rb +1 -1
  160. data/test/requests/sql/test_create_or_update_firewall_rule.rb +1 -1
  161. data/test/requests/sql/test_create_or_update_sql_server.rb +1 -1
  162. data/test/requests/sql/test_delete_database.rb +1 -1
  163. data/test/requests/sql/test_delete_firewall_rule.rb +1 -1
  164. data/test/requests/sql/test_delete_sql_server.rb +1 -1
  165. data/test/requests/sql/test_get_database.rb +1 -1
  166. data/test/requests/sql/test_get_firewall_rule.rb +1 -1
  167. data/test/requests/sql/test_get_sql_server.rb +1 -1
  168. data/test/requests/sql/test_list_databases.rb +1 -1
  169. data/test/requests/sql/test_list_firewall_rules.rb +1 -1
  170. data/test/requests/sql/test_list_sql_servers.rb +1 -1
  171. data/test/requests/storage/test_acquire_blob_lease.rb +1 -1
  172. data/test/requests/storage/test_acquire_container_lease.rb +1 -1
  173. data/test/requests/storage/test_check_storage_account_exists.rb +1 -1
  174. data/test/requests/storage/test_check_storage_account_name_availability.rb +1 -1
  175. data/test/requests/storage/test_commit_blob_blocks.rb +1 -1
  176. data/test/requests/storage/test_compare_container_blobs.rb +1 -1
  177. data/test/requests/storage/test_copy_blob.rb +1 -1
  178. data/test/requests/storage/test_copy_blob_from_uri.rb +1 -1
  179. data/test/requests/storage/test_create_block_blob.rb +1 -1
  180. data/test/requests/storage/test_create_container.rb +1 -1
  181. data/test/requests/storage/test_create_page_blob.rb +1 -1
  182. data/test/requests/storage/test_create_storage_account.rb +1 -1
  183. data/test/requests/storage/test_delete_blob.rb +1 -1
  184. data/test/requests/storage/test_delete_container.rb +1 -1
  185. data/test/requests/storage/test_delete_storage_account.rb +1 -1
  186. data/test/requests/storage/test_get_blob.rb +3 -3
  187. data/test/requests/storage/test_get_blob_properties.rb +1 -1
  188. data/test/requests/storage/test_get_container_acl.rb +1 -1
  189. data/test/requests/storage/test_get_container_properties.rb +1 -1
  190. data/test/requests/storage/test_get_storage_access_keys.rb +1 -1
  191. data/test/requests/storage/test_get_storage_account.rb +1 -1
  192. data/test/requests/storage/test_list_blobs.rb +1 -1
  193. data/test/requests/storage/test_list_containers.rb +1 -1
  194. data/test/requests/storage/test_list_storage_accounts.rb +1 -1
  195. data/test/requests/storage/test_list_storage_accounts_for_rg.rb +1 -1
  196. data/test/requests/storage/test_put_blob_block.rb +1 -1
  197. data/test/requests/storage/test_put_blob_metadata.rb +1 -1
  198. data/test/requests/storage/test_put_blob_pages.rb +1 -1
  199. data/test/requests/storage/test_put_blob_properties.rb +1 -1
  200. data/test/requests/storage/test_put_container_acl.rb +1 -1
  201. data/test/requests/storage/test_put_container_metadata.rb +1 -1
  202. data/test/requests/storage/test_release_blob_lease.rb +1 -1
  203. data/test/requests/storage/test_release_container_lease.rb +1 -1
  204. data/test/requests/storage/test_update_storage_account.rb +1 -1
  205. data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +1 -1
  206. data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +1 -1
  207. data/test/requests/traffic_manager/test_create_traffic_manager_endpoint.rb +1 -1
  208. data/test/requests/traffic_manager/test_create_traffic_manager_profile.rb +1 -1
  209. data/test/requests/traffic_manager/test_delete_traffic_manager_endpoint.rb +1 -1
  210. data/test/requests/traffic_manager/test_delete_traffic_manager_profile.rb +1 -1
  211. data/test/requests/traffic_manager/test_get_traffic_manager_endpoint.rb +1 -1
  212. data/test/requests/traffic_manager/test_get_traffic_manager_profile.rb +1 -1
  213. data/test/requests/traffic_manager/test_list_traffic_manager_profiles.rb +1 -1
  214. data/test/requests/traffic_manager/test_update_traffic_manager_endpoint.rb +1 -1
  215. data/test/requests/traffic_manager/test_update_traffic_manager_profile.rb +1 -1
  216. metadata +4 -3
@@ -18,7 +18,7 @@ class TestGetVirtualNetwork < Minitest::Test
18
18
  def test_get_virtual_network_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @virtual_networks.stub :get, response do
21
- assert_raises RuntimeError do
21
+ assert_raises MsRestAzure::AzureOperationError do
22
22
  @service.get_virtual_network('fog-test-rg', 'fog-test-virtual-network')
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestGetVirtualNetworkGateway < Minitest::Test
18
18
  def test_get_virtual_network_gateway_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @network_gateways.stub :get, response do
21
- assert_raises(RuntimeError) { @service.get_virtual_network_gateway('fog-test-rg', 'fog-test-network-gateway') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.get_virtual_network_gateway('fog-test-rg', 'fog-test-network-gateway') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestGetVirtualNetworkGatewayConnection < Minitest::Test
18
18
  def test_get_virtual_network_gateway_connection_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @gateway_connections.stub :get, response do
21
- assert_raises(RuntimeError) { @service.get_virtual_network_gateway_connection('fog-test-rg', 'fog-test-gateway-connection') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.get_virtual_network_gateway_connection('fog-test-rg', 'fog-test-gateway-connection') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListExpressRouteCircuitAuthorization < Minitest::Test
18
18
  def test_list_express_route_circuit_authorizations_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @circuit_authorization.stub :list, response do
21
- assert_raises(RuntimeError) { @service.list_express_route_circuit_authorizations('fogRM-rg', 'testCircuit') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_express_route_circuit_authorizations('fogRM-rg', 'testCircuit') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListExpressRouteCircuitPeerings < Minitest::Test
18
18
  def test_list_express_route_circuit_peerings_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @circuit_peering.stub :list, response do
21
- assert_raises(RuntimeError) { @service.list_express_route_circuit_peerings('fogRM-rg', 'testCircuit') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_express_route_circuit_peerings('fogRM-rg', 'testCircuit') }
22
22
  end
23
23
  end
24
24
  end
@@ -20,7 +20,7 @@ class TestListExpressRouteCircuits < Minitest::Test
20
20
  def test_list_express_route_circuits_failure
21
21
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
22
22
  @circuit.stub :list, response do
23
- assert_raises(RuntimeError) { @service.list_express_route_circuits('fogRM-rg') }
23
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_express_route_circuits('fogRM-rg') }
24
24
  end
25
25
  end
26
26
  end
@@ -18,7 +18,7 @@ class TestListExpressServiceProviders < Minitest::Test
18
18
  def test_list_express_route_service_providers_failure
19
19
  response = -> { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @service_provider.stub :list, response do
21
- assert_raises(RuntimeError) { @service.list_express_route_service_providers }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_express_route_service_providers }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListLoadBalancers < Minitest::Test
18
18
  def test_list_load_balancers_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @load_balancers.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_load_balancers('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_load_balancers('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListLocalNetwrokGateways < Minitest::Test
18
18
  def test_list_local_network_gateways_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @local_network_gateways.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_local_network_gateways('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_local_network_gateways('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListNetworkInterfaces < Minitest::Test
18
18
  def test_list_network_interfaces_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @network_interfaces.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_network_interfaces('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_network_interfaces('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListNetworkSecurityGroup < Minitest::Test
18
18
  def test_list_network_security_group_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @network_security_groups.stub :list_as_lazy, response do
21
- assert_raises RuntimeError do
21
+ assert_raises MsRestAzure::AzureOperationError do
22
22
  @service.list_network_security_groups('fog-test-rg')
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListNetworkSecurityRule < Minitest::Test
18
18
  def test_list_network_security_rule_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @network_security_rules.stub :list_as_lazy, response do
21
- assert_raises RuntimeError do
21
+ assert_raises MsRestAzure::AzureOperationError do
22
22
  @service.list_network_security_rules('fog-test-rg', 'fog-test-nsg')
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListPublicIps < Minitest::Test
18
18
  def test_list_public_ips_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @public_ips.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_public_ips('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_public_ips('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListSubnets < Minitest::Test
18
18
  def test_list_subnets_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @subnets.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_subnets('fog-test-rg', 'fog-test-virtual-network') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_subnets('fog-test-rg', 'fog-test-virtual-network') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListVirtualNetwrokGatewayConnections < Minitest::Test
18
18
  def test_list_virtual_network_gateway_connections_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @gateway_connections.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_virtual_network_gateway_connections('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_virtual_network_gateway_connections('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListVirtualNetwrokGateways < Minitest::Test
18
18
  def test_list_virtual_network_gateways_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @network_gateways.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_virtual_network_gateways('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_virtual_network_gateways('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListVirtualNetworks < Minitest::Test
18
18
  def test_list_virtual_networks_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @virtual_networks.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_virtual_networks('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_virtual_networks('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListVirtualNetworksInSubscription < Minitest::Test
18
18
  def test_list_virtual_networks_in_subscription_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @virtual_networks.stub :list_all, response do
21
- assert_raises(RuntimeError) { @service.list_virtual_networks_in_subscription }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_virtual_networks_in_subscription }
22
22
  end
23
23
  end
24
24
  end
@@ -21,7 +21,7 @@ class TestRemoveddressPrefixesInVirtualNetwork < Minitest::Test
21
21
  def test_remove_address_prefixes_in_virtual_network_failure
22
22
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
23
23
  @virtual_networks.stub :get, response do
24
- assert_raises RuntimeError do
24
+ assert_raises MsRestAzure::AzureOperationError do
25
25
  @service.remove_address_prefixes_from_virtual_network('fog-test-rg', 'fog-test-virtual-network', ['10.1.0.0/16'])
26
26
  end
27
27
  end
@@ -21,7 +21,7 @@ class TestRemoveDnsServersInVirtualNetwork < Minitest::Test
21
21
  def test_remove_dns_servers_in_virtual_network_failure
22
22
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
23
23
  @virtual_networks.stub :get, response do
24
- assert_raises RuntimeError do
24
+ assert_raises MsRestAzure::AzureOperationError do
25
25
  @service.remove_dns_servers_from_virtual_network('fog-test-rg', 'fog-test-virtual-network', ['10.1.0.5'])
26
26
  end
27
27
  end
@@ -21,7 +21,7 @@ class TestRemoveSubnetsInVirtualNetwork < Minitest::Test
21
21
  def test_remove_subnets_in_virtual_network_failure
22
22
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
23
23
  @virtual_networks.stub :get, response do
24
- assert_raises RuntimeError do
24
+ assert_raises MsRestAzure::AzureOperationError do
25
25
  @service.remove_subnets_from_virtual_network('fog-test-rg', 'fog-test-virtual-network', ['mysubnet1'])
26
26
  end
27
27
  end
@@ -17,7 +17,7 @@ class TestResetConnectionSharedKey < Minitest::Test
17
17
  def test_reset_connection_shared_key_failure
18
18
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
19
19
  @gateway_connections.stub :reset_shared_key, response do
20
- assert_raises(RuntimeError) { @service.reset_connection_shared_key('fog-test-rg', 'fog-test-gateway-connection', '20') }
20
+ assert_raises(MsRestAzure::AzureOperationError) { @service.reset_connection_shared_key('fog-test-rg', 'fog-test-gateway-connection', '20') }
21
21
  end
22
22
  end
23
23
  end
@@ -17,7 +17,7 @@ class TestSetConnectionSharedKey < Minitest::Test
17
17
  def test_set_connection_shared_key_failure
18
18
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
19
19
  @gateway_connections.stub :set_shared_key, response do
20
- assert_raises(RuntimeError) { @service.set_connection_shared_key('fog-test-rg', 'fog-test-gateway-connection', 'hello') }
20
+ assert_raises(MsRestAzure::AzureOperationError) { @service.set_connection_shared_key('fog-test-rg', 'fog-test-gateway-connection', 'hello') }
21
21
  end
22
22
  end
23
23
  end
@@ -27,7 +27,7 @@ class TestUpdatePublicIp < Minitest::Test
27
27
  def test_update_public_ip_exception_failure
28
28
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
29
29
  @public_ips.stub :create_or_update, response do
30
- assert_raises RuntimeError do
30
+ assert_raises MsRestAzure::AzureOperationError do
31
31
  @service.create_or_update_public_ip('fog-test-rg', 'fog-test-public-ip', 'West US', 'Dynamic', '4', 'mylabel', @tags)
32
32
  end
33
33
  end
@@ -23,7 +23,7 @@ class TestGetDeployment < Minitest::Test
23
23
  def test_check_deployment_exists_exception
24
24
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
25
25
  @deployments.stub :check_existence, response do
26
- assert_raises(RuntimeError) { @service.check_deployment_exists('fog-test-rg', 'fog-test-deployment') }
26
+ assert_raises(MsRestAzure::AzureOperationError) { @service.check_deployment_exists('fog-test-rg', 'fog-test-deployment') }
27
27
  end
28
28
  end
29
29
  end
@@ -23,7 +23,7 @@ class TestGetResourceGroup < Minitest::Test
23
23
  def test_check_resource_group_exists_exception
24
24
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
25
25
  @resource_groups.stub :check_existence, response do
26
- assert_raises(RuntimeError) { @service.check_resource_group_exists('fog-test-rg') }
26
+ assert_raises(MsRestAzure::AzureOperationError) { @service.check_resource_group_exists('fog-test-rg') }
27
27
  end
28
28
  end
29
29
  end
@@ -25,7 +25,7 @@ class TestCreateDeployment < Minitest::Test
25
25
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
26
26
  @deployments.stub :validate, true do
27
27
  @deployments.stub :create_or_update, response do
28
- assert_raises(RuntimeError) { @service.create_deployment(@resource_group, @deployment_name, @template_link, @parameters_link) }
28
+ assert_raises(MsRestAzure::AzureOperationError) { @service.create_deployment(@resource_group, @deployment_name, @template_link, @parameters_link) }
29
29
  end
30
30
  end
31
31
  end
@@ -19,7 +19,7 @@ class TestCreateResourceGroup < Minitest::Test
19
19
  def test_create_resource_group_failure
20
20
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
21
21
  @resource_groups.stub :create_or_update, response do
22
- assert_raises(RuntimeError) { @service.create_resource_group('fog-test-rg', 'west us', @tags) }
22
+ assert_raises(MsRestAzure::AzureOperationError) { @service.create_resource_group('fog-test-rg', 'west us', @tags) }
23
23
  end
24
24
  end
25
25
  end
@@ -19,7 +19,7 @@ class TestDeleteDeployment < Minitest::Test
19
19
  def test_list_deployment_failure
20
20
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
21
21
  @deployments.stub :delete, response do
22
- assert_raises(RuntimeError) { @service.delete_deployment(@resource_group, @deployment_name) }
22
+ assert_raises(MsRestAzure::AzureOperationError) { @service.delete_deployment(@resource_group, @deployment_name) }
23
23
  end
24
24
  end
25
25
  end
@@ -18,7 +18,7 @@ class TestDeleteResourceGroup < Minitest::Test
18
18
  def test_delete_resource_group_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @resource_groups.stub :delete, response do
21
- assert_raises(RuntimeError) { @service.delete_resource_group('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.delete_resource_group('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -23,7 +23,7 @@ class TestDeleteResourceTag < Minitest::Test
23
23
  @resources.stub :get, @resource_response do
24
24
  @resources.stub :create_or_update, response do
25
25
  resource_id = '/subscriptions/########-####-####-####-############/resourceGroups/{RESOURCE-GROUP}/providers/Microsoft.Network/{PROVIDER-NAME}/{RESOURCE-NAME}'
26
- assert_raises(RuntimeError) { @service.delete_resource_tag(resource_id, 'tag_name', 'tag_value', 'api_version') }
26
+ assert_raises(MsRestAzure::AzureOperationError) { @service.delete_resource_tag(resource_id, 'tag_name', 'tag_value', 'api_version') }
27
27
  end
28
28
  end
29
29
  end
@@ -18,7 +18,7 @@ class TestGetDeployment < Minitest::Test
18
18
  def test_list_deployment_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @deployments.stub :get, response do
21
- assert_raises(RuntimeError) { @service.get_deployment('fog-test-rg', 'fog-test-deployment') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.get_deployment('fog-test-rg', 'fog-test-deployment') }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestGetResourceGroup < Minitest::Test
18
18
  def test_get_resource_group_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @resource_groups.stub :get, response do
21
- assert_raises(RuntimeError) { @service.get_resource_group('fog-test-rg') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.get_resource_group('fog-test-rg') }
22
22
  end
23
23
  end
24
24
  end
@@ -19,7 +19,7 @@ class TestListDeployment < Minitest::Test
19
19
  def test_list_deployment_failure
20
20
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
21
21
  @deployments.stub :list_as_lazy, response do
22
- assert_raises(RuntimeError) { @service.list_deployments(@resource_group) }
22
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_deployments(@resource_group) }
23
23
  end
24
24
  end
25
25
  end
@@ -18,7 +18,7 @@ class TestListResourceGroups < Minitest::Test
18
18
  def test_list_resource_group_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @resource_groups.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_resource_groups }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_resource_groups }
22
22
  end
23
23
  end
24
24
  end
@@ -18,7 +18,7 @@ class TestListTags < Minitest::Test
18
18
  def test_list_tagged_resources_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @resources.stub :list_as_lazy, response do
21
- assert_raises(RuntimeError) { @service.list_tagged_resources('test_key') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.list_tagged_resources('test_key') }
22
22
  end
23
23
  end
24
24
  end
@@ -23,7 +23,7 @@ class TestTagResource < Minitest::Test
23
23
  @resources.stub :get, @resource_response do
24
24
  @resources.stub :create_or_update, response do
25
25
  resource_id = '/subscriptions/########-####-####-####-############/resourceGroups/{RESOURCE-GROUP}/providers/Microsoft.Network/{PROVIDER-NAME}/{RESOURCE-NAME}'
26
- assert_raises(RuntimeError) { @service.tag_resource(resource_id, 'tag_name', 'tag_value', 'api_version') }
26
+ assert_raises(MsRestAzure::AzureOperationError) { @service.tag_resource(resource_id, 'tag_name', 'tag_value', 'api_version') }
27
27
  end
28
28
  end
29
29
  end
@@ -19,7 +19,7 @@ class TestCreateOrUpdateDatabase < Minitest::Test
19
19
  def test_create_or_update_database_failure
20
20
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
21
21
  @databases.stub :create_or_update, response do
22
- assert_raises(RuntimeError) { @service.create_or_update_database(@database_hash) }
22
+ assert_raises(MsRestAzure::AzureOperationError) { @service.create_or_update_database(@database_hash) }
23
23
  end
24
24
  end
25
25
  end
@@ -19,7 +19,7 @@ class TestCreateOrUpdateFirewallRule < Minitest::Test
19
19
  def test_create_or_update_sql_server_firewall_rule_failure
20
20
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
21
21
  @firewall_rule.stub :create_or_update_firewall_rule, response do
22
- assert_raises(RuntimeError) { @service.create_or_update_firewall_rule(@data_hash) }
22
+ assert_raises(MsRestAzure::AzureOperationError) { @service.create_or_update_firewall_rule(@data_hash) }
23
23
  end
24
24
  end
25
25
  end
@@ -19,7 +19,7 @@ class TestCreateOrUpdateSqlServer < Minitest::Test
19
19
  def test_create_or_update_sql_server_failure
20
20
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
21
21
  @server.stub :create_or_update, response do
22
- assert_raises(RuntimeError) { @service.create_or_update_sql_server(@data_hash) }
22
+ assert_raises(MsRestAzure::AzureOperationError) { @service.create_or_update_sql_server(@data_hash) }
23
23
  end
24
24
  end
25
25
  end
@@ -17,7 +17,7 @@ class TestDeleteDatabase < Minitest::Test
17
17
  def test_delete_database_failure
18
18
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
19
19
  @databases.stub :delete, response do
20
- assert_raises(RuntimeError) { @service.delete_database('fog-test-rg', 'fog-test-server-name', 'database-name') }
20
+ assert_raises(MsRestAzure::AzureOperationError) { @service.delete_database('fog-test-rg', 'fog-test-server-name', 'database-name') }
21
21
  end
22
22
  end
23
23
  end
@@ -17,7 +17,7 @@ class TestDeleteFirewallRule < Minitest::Test
17
17
  def test_delete_sql_server_firewall_rule_failure
18
18
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
19
19
  @firewall_rules.stub :delete_firewall_rule, response do
20
- assert_raises(RuntimeError) { @service.delete_firewall_rule('fog-test-rg', 'fog-test-server-name', 'rule-name') }
20
+ assert_raises(MsRestAzure::AzureOperationError) { @service.delete_firewall_rule('fog-test-rg', 'fog-test-server-name', 'rule-name') }
21
21
  end
22
22
  end
23
23
  end
@@ -17,7 +17,7 @@ class TestDeleteSqlServer < Minitest::Test
17
17
  def test_delete_sql_server_failure
18
18
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
19
19
  @servers.stub :delete, response do
20
- assert_raises(RuntimeError) { @service.delete_sql_server('fog-test-rg', 'fog-test-server-name') }
20
+ assert_raises(MsRestAzure::AzureOperationError) { @service.delete_sql_server('fog-test-rg', 'fog-test-server-name') }
21
21
  end
22
22
  end
23
23
  end
@@ -18,7 +18,7 @@ class TestGetDatabase < Minitest::Test
18
18
  def test_get_database_failure
19
19
  response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
20
20
  @databases.stub :get, response do
21
- assert_raises(RuntimeError) { @service.get_database('fog-test-rg', 'fog-test-server-name', 'fog-test-database-name') }
21
+ assert_raises(MsRestAzure::AzureOperationError) { @service.get_database('fog-test-rg', 'fog-test-server-name', 'fog-test-database-name') }
22
22
  end
23
23
  end
24
24
  end