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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/fog/azurerm/custom_fog_errors.rb +18 -0
- data/lib/fog/azurerm/utilities/general.rb +5 -5
- data/lib/fog/azurerm/version.rb +1 -1
- data/test/requests/application_gateway/test_check_ag_exists.rb +1 -1
- data/test/requests/application_gateway/test_create_or_update_application_gateway.rb +1 -1
- data/test/requests/application_gateway/test_delete_application_gateway.rb +1 -1
- data/test/requests/application_gateway/test_get_application_gateway.rb +1 -1
- data/test/requests/application_gateway/test_list_application_gateways.rb +1 -1
- data/test/requests/application_gateway/test_start_application_gateway.rb +1 -1
- data/test/requests/application_gateway/test_stop_application_gateway.rb +1 -1
- data/test/requests/compute/test_attach_data_disk_to_vm.rb +4 -4
- data/test/requests/compute/test_check_availability_set_exists.rb +1 -1
- data/test/requests/compute/test_check_managed_disk_exists.rb +1 -1
- data/test/requests/compute/test_check_vm_exists.rb +1 -1
- data/test/requests/compute/test_check_vm_extension_exists.rb +1 -1
- data/test/requests/compute/test_create_availability_set.rb +2 -2
- data/test/requests/compute/test_create_image.rb +1 -1
- data/test/requests/compute/test_create_or_update_managed_disk.rb +1 -1
- data/test/requests/compute/test_create_virtual_machine.rb +2 -2
- data/test/requests/compute/test_create_vm_extension.rb +1 -1
- data/test/requests/compute/test_deallocate_virtual_machine.rb +2 -2
- data/test/requests/compute/test_delete_availability_set.rb +1 -1
- data/test/requests/compute/test_delete_image.rb +1 -1
- data/test/requests/compute/test_delete_managed_disk.rb +1 -1
- data/test/requests/compute/test_delete_virtual_machine.rb +2 -2
- data/test/requests/compute/test_detach_data_disk_from_vm.rb +1 -1
- data/test/requests/compute/test_generalize_virtual_machine.rb +2 -2
- data/test/requests/compute/test_get_availability_set.rb +1 -1
- data/test/requests/compute/test_get_image.rb +1 -1
- data/test/requests/compute/test_get_managed_disk.rb +1 -1
- data/test/requests/compute/test_get_virtual_machine.rb +1 -1
- data/test/requests/compute/test_get_vm_extension.rb +1 -1
- data/test/requests/compute/test_get_vm_status.rb +1 -1
- data/test/requests/compute/test_grant_access_to_managed_disk.rb +1 -1
- data/test/requests/compute/test_list_availability_sets.rb +1 -1
- data/test/requests/compute/test_list_available_sizes_for_virtual_machine.rb +2 -2
- data/test/requests/compute/test_list_managed_disks_by_rg.rb +1 -1
- data/test/requests/compute/test_list_managed_disks_in_subscription.rb +1 -1
- data/test/requests/compute/test_list_virtual_machines.rb +1 -1
- data/test/requests/compute/test_power_off_virtual_machine.rb +2 -2
- data/test/requests/compute/test_redeploy_virtual_machine.rb +2 -2
- data/test/requests/compute/test_restart_virtual_machine.rb +2 -2
- data/test/requests/compute/test_revoke_access_to_managed_disk.rb +1 -1
- data/test/requests/compute/test_start_virtual_machine.rb +2 -2
- data/test/requests/compute/test_update_vm_extension.rb +1 -1
- data/test/requests/dns/test_check_record_set_exists.rb +1 -1
- data/test/requests/dns/test_check_zone_exists.rb +1 -1
- data/test/requests/dns/test_create_record_set.rb +1 -1
- data/test/requests/dns/test_create_zone.rb +1 -1
- data/test/requests/dns/test_delete_record_set.rb +1 -1
- data/test/requests/dns/test_delete_zone.rb +1 -1
- data/test/requests/dns/test_get_record_set.rb +1 -1
- data/test/requests/dns/test_get_records_from_record_set.rb +1 -1
- data/test/requests/dns/test_get_zone.rb +1 -1
- data/test/requests/dns/test_list_record_sets.rb +1 -1
- data/test/requests/dns/test_list_zones.rb +1 -1
- data/test/requests/key_vault/test_check_vault_exists.rb +1 -1
- data/test/requests/key_vault/test_create_or_update_vault.rb +1 -1
- data/test/requests/key_vault/test_delete_vault.rb +1 -1
- data/test/requests/key_vault/test_get_vault.rb +1 -1
- data/test/requests/key_vault/test_list_vaults.rb +1 -1
- data/test/requests/network/test_add_address_prefixes_in_virtual_network.rb +1 -1
- data/test/requests/network/test_add_dns_servers_in_virtual_network.rb +1 -1
- data/test/requests/network/test_add_subnets_in_virtual_network.rb +1 -1
- data/test/requests/network/test_attach_network_security_group_to_subnet.rb +1 -1
- data/test/requests/network/test_attach_resource_to_nic.rb +1 -1
- data/test/requests/network/test_attach_route_table_to_subnet.rb +1 -1
- data/test/requests/network/test_check_express_route_cir_auth_exists.rb +1 -1
- data/test/requests/network/test_check_express_route_circuit_exists.rb +1 -1
- data/test/requests/network/test_check_load_balancer_exists.rb +1 -1
- data/test/requests/network/test_check_local_net_gateway_exists.rb +1 -1
- data/test/requests/network/test_check_net_sec_group_exists.rb +1 -1
- data/test/requests/network/test_check_net_sec_rule_exists.rb +1 -1
- data/test/requests/network/test_check_network_interface_exists.rb +1 -1
- data/test/requests/network/test_check_public_ip_exists.rb +1 -1
- data/test/requests/network/test_check_subnet_exists.rb +1 -1
- data/test/requests/network/test_check_virtual_network_exists.rb +1 -1
- data/test/requests/network/test_check_vnet_gateway_connection_exists.rb +1 -1
- data/test/requests/network/test_check_vnet_gateway_exists.rb +1 -1
- data/test/requests/network/test_create_express_route_circuit.rb +1 -1
- data/test/requests/network/test_create_express_route_circuit_authorization.rb +1 -1
- data/test/requests/network/test_create_express_route_circuit_peering.rb +1 -1
- data/test/requests/network/test_create_load_balancer.rb +1 -1
- data/test/requests/network/test_create_local_network_gateway.rb +1 -1
- data/test/requests/network/test_create_network_interface.rb +1 -1
- data/test/requests/network/test_create_or_update_network_security_group.rb +1 -1
- data/test/requests/network/test_create_or_update_network_security_rule.rb +1 -1
- data/test/requests/network/test_create_or_update_virtual_network.rb +1 -1
- data/test/requests/network/test_create_public_ip.rb +1 -1
- data/test/requests/network/test_create_subnet.rb +1 -1
- data/test/requests/network/test_create_virtual_network_gateway.rb +1 -1
- data/test/requests/network/test_create_virtual_network_gateway_connection.rb +1 -1
- data/test/requests/network/test_delete_express_route_circuit.rb +1 -1
- data/test/requests/network/test_delete_express_route_circuit_authorization.rb +1 -1
- data/test/requests/network/test_delete_express_route_circuit_peering.rb +1 -1
- data/test/requests/network/test_delete_load_balancer.rb +1 -1
- data/test/requests/network/test_delete_local_network_gateway.rb +1 -1
- data/test/requests/network/test_delete_network_interface.rb +1 -1
- data/test/requests/network/test_delete_network_security_group.rb +1 -1
- data/test/requests/network/test_delete_network_security_rule.rb +1 -1
- data/test/requests/network/test_delete_public_ip.rb +1 -1
- data/test/requests/network/test_delete_subnet.rb +1 -1
- data/test/requests/network/test_delete_virtual_network.rb +1 -1
- data/test/requests/network/test_delete_virtual_network_gateway.rb +1 -1
- data/test/requests/network/test_delete_virtual_network_gateway_connection.rb +1 -1
- data/test/requests/network/test_detach_network_security_group_from_subnet.rb +1 -1
- data/test/requests/network/test_detach_resource_from_nic.rb +1 -1
- data/test/requests/network/test_detach_route_table_from_subnet.rb +1 -1
- data/test/requests/network/test_get_connection_shared_key.rb +1 -1
- data/test/requests/network/test_get_express_route_circuit.rb +1 -1
- data/test/requests/network/test_get_express_route_circuit_authorization.rb +1 -1
- data/test/requests/network/test_get_express_route_circuit_peering.rb +1 -1
- data/test/requests/network/test_get_load_balancer.rb +1 -1
- data/test/requests/network/test_get_local_network_gateway.rb +1 -1
- data/test/requests/network/test_get_network_interface.rb +1 -1
- data/test/requests/network/test_get_network_security_group.rb +1 -1
- data/test/requests/network/test_get_network_security_rule.rb +1 -1
- data/test/requests/network/test_get_public_ip.rb +1 -1
- data/test/requests/network/test_get_subnet.rb +1 -1
- data/test/requests/network/test_get_virtual_network.rb +1 -1
- data/test/requests/network/test_get_virtual_network_gateway.rb +1 -1
- data/test/requests/network/test_get_virtual_network_gateway_connection.rb +1 -1
- data/test/requests/network/test_list_express_route_circuit_authorizations.rb +1 -1
- data/test/requests/network/test_list_express_route_circuit_peerings.rb +1 -1
- data/test/requests/network/test_list_express_route_circuits.rb +1 -1
- data/test/requests/network/test_list_express_route_service_providers.rb +1 -1
- data/test/requests/network/test_list_load_balancers.rb +1 -1
- data/test/requests/network/test_list_local_network_gateways.rb +1 -1
- data/test/requests/network/test_list_network_interfaces.rb +1 -1
- data/test/requests/network/test_list_network_security_groups.rb +1 -1
- data/test/requests/network/test_list_network_security_rules.rb +1 -1
- data/test/requests/network/test_list_public_ips.rb +1 -1
- data/test/requests/network/test_list_subnets.rb +1 -1
- data/test/requests/network/test_list_virtual_network_gateway_connections.rb +1 -1
- data/test/requests/network/test_list_virtual_network_gateways.rb +1 -1
- data/test/requests/network/test_list_virtual_networks.rb +1 -1
- data/test/requests/network/test_list_virtual_networks_in_subscription.rb +1 -1
- data/test/requests/network/test_remove_address_prefixes_from_virtual_network.rb +1 -1
- data/test/requests/network/test_remove_dns_servers_from_virtual_network.rb +1 -1
- data/test/requests/network/test_remove_subnets_from_virtual_network.rb +1 -1
- data/test/requests/network/test_reset_connection_shared_key.rb +1 -1
- data/test/requests/network/test_set_connection_shared_key.rb +1 -1
- data/test/requests/network/test_update_public_ip.rb +1 -1
- data/test/requests/resources/test_check_deployment_exists.rb +1 -1
- data/test/requests/resources/test_check_resource_group_exists.rb +1 -1
- data/test/requests/resources/test_create_deployment.rb +1 -1
- data/test/requests/resources/test_create_resource_group.rb +1 -1
- data/test/requests/resources/test_delete_deployment.rb +1 -1
- data/test/requests/resources/test_delete_resource_group.rb +1 -1
- data/test/requests/resources/test_delete_resource_tag.rb +1 -1
- data/test/requests/resources/test_get_deployment.rb +1 -1
- data/test/requests/resources/test_get_resource_group.rb +1 -1
- data/test/requests/resources/test_list_deployments.rb +1 -1
- data/test/requests/resources/test_list_resource_groups.rb +1 -1
- data/test/requests/resources/test_list_tagged_resources.rb +1 -1
- data/test/requests/resources/test_tag_resource.rb +1 -1
- data/test/requests/sql/test_create_or_update_database.rb +1 -1
- data/test/requests/sql/test_create_or_update_firewall_rule.rb +1 -1
- data/test/requests/sql/test_create_or_update_sql_server.rb +1 -1
- data/test/requests/sql/test_delete_database.rb +1 -1
- data/test/requests/sql/test_delete_firewall_rule.rb +1 -1
- data/test/requests/sql/test_delete_sql_server.rb +1 -1
- data/test/requests/sql/test_get_database.rb +1 -1
- data/test/requests/sql/test_get_firewall_rule.rb +1 -1
- data/test/requests/sql/test_get_sql_server.rb +1 -1
- data/test/requests/sql/test_list_databases.rb +1 -1
- data/test/requests/sql/test_list_firewall_rules.rb +1 -1
- data/test/requests/sql/test_list_sql_servers.rb +1 -1
- data/test/requests/storage/test_acquire_blob_lease.rb +1 -1
- data/test/requests/storage/test_acquire_container_lease.rb +1 -1
- data/test/requests/storage/test_check_storage_account_exists.rb +1 -1
- data/test/requests/storage/test_check_storage_account_name_availability.rb +1 -1
- data/test/requests/storage/test_commit_blob_blocks.rb +1 -1
- data/test/requests/storage/test_compare_container_blobs.rb +1 -1
- data/test/requests/storage/test_copy_blob.rb +1 -1
- data/test/requests/storage/test_copy_blob_from_uri.rb +1 -1
- data/test/requests/storage/test_create_block_blob.rb +1 -1
- data/test/requests/storage/test_create_container.rb +1 -1
- data/test/requests/storage/test_create_page_blob.rb +1 -1
- data/test/requests/storage/test_create_storage_account.rb +1 -1
- data/test/requests/storage/test_delete_blob.rb +1 -1
- data/test/requests/storage/test_delete_container.rb +1 -1
- data/test/requests/storage/test_delete_storage_account.rb +1 -1
- data/test/requests/storage/test_get_blob.rb +3 -3
- data/test/requests/storage/test_get_blob_properties.rb +1 -1
- data/test/requests/storage/test_get_container_acl.rb +1 -1
- data/test/requests/storage/test_get_container_properties.rb +1 -1
- data/test/requests/storage/test_get_storage_access_keys.rb +1 -1
- data/test/requests/storage/test_get_storage_account.rb +1 -1
- data/test/requests/storage/test_list_blobs.rb +1 -1
- data/test/requests/storage/test_list_containers.rb +1 -1
- data/test/requests/storage/test_list_storage_accounts.rb +1 -1
- data/test/requests/storage/test_list_storage_accounts_for_rg.rb +1 -1
- data/test/requests/storage/test_put_blob_block.rb +1 -1
- data/test/requests/storage/test_put_blob_metadata.rb +1 -1
- data/test/requests/storage/test_put_blob_pages.rb +1 -1
- data/test/requests/storage/test_put_blob_properties.rb +1 -1
- data/test/requests/storage/test_put_container_acl.rb +1 -1
- data/test/requests/storage/test_put_container_metadata.rb +1 -1
- data/test/requests/storage/test_release_blob_lease.rb +1 -1
- data/test/requests/storage/test_release_container_lease.rb +1 -1
- data/test/requests/storage/test_update_storage_account.rb +1 -1
- data/test/requests/traffic_manager/test_check_traffic_manager_endpoint_exists.rb +1 -1
- data/test/requests/traffic_manager/test_check_traffic_manager_profile_exists.rb +1 -1
- data/test/requests/traffic_manager/test_create_traffic_manager_endpoint.rb +1 -1
- data/test/requests/traffic_manager/test_create_traffic_manager_profile.rb +1 -1
- data/test/requests/traffic_manager/test_delete_traffic_manager_endpoint.rb +1 -1
- data/test/requests/traffic_manager/test_delete_traffic_manager_profile.rb +1 -1
- data/test/requests/traffic_manager/test_get_traffic_manager_endpoint.rb +1 -1
- data/test/requests/traffic_manager/test_get_traffic_manager_profile.rb +1 -1
- data/test/requests/traffic_manager/test_list_traffic_manager_profiles.rb +1 -1
- data/test/requests/traffic_manager/test_update_traffic_manager_endpoint.rb +1 -1
- data/test/requests/traffic_manager/test_update_traffic_manager_profile.rb +1 -1
- 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
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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
|
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
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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
|
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
|
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
|
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(
|
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(
|
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
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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
|