From 9a503f6a4e8b8931e021a6e8f69b7a4dbe95fed0 Mon Sep 17 00:00:00 2001 From: "bilal.naeem" Date: Fri, 22 Sep 2017 17:37:04 +0500 Subject: [PATCH] Updated credentials path in integration tests --- .../azurerm/models/traffic_manager/traffic_manager_profile.rb | 2 +- test/integration/application_gateway.rb | 2 +- test/integration/availability_set.rb | 2 +- test/integration/blob.rb | 2 +- test/integration/container.rb | 2 +- test/integration/data_disk.rb | 2 +- test/integration/deployment.rb | 2 +- test/integration/express_route_circuit.rb | 2 +- test/integration/external_load_balancer.rb | 2 +- test/integration/internal_load_balancer.rb | 2 +- test/integration/key_vault.rb | 2 +- test/integration/local_network_gateway.rb | 2 +- test/integration/managed_disk.rb | 2 +- test/integration/network_interface.rb | 2 +- test/integration/network_security_group.rb | 2 +- test/integration/network_security_rule.rb | 2 +- test/integration/public_ip.rb | 2 +- test/integration/record_set.rb | 2 +- test/integration/resource_group.rb | 2 +- test/integration/resource_tag.rb | 2 +- test/integration/server.rb | 2 +- test/integration/server_custom_image.rb | 2 +- test/integration/sql_server.rb | 2 +- test/integration/storage_account.rb | 2 +- test/integration/subnet.rb | 2 +- test/integration/traffic_manager.rb | 2 +- test/integration/virtual_machine_extension.rb | 2 +- test/integration/virtual_network.rb | 2 +- test/integration/virtual_network_gateway.rb | 2 +- test/integration/virtual_network_gateway_connection.rb | 2 +- .../virtual_network_gateway_connection_to_express_route.rb | 2 +- test/integration/zone.rb | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb b/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb index 77ee241ac..679670290 100644 --- a/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb +++ b/lib/fog/azurerm/models/traffic_manager/traffic_manager_profile.rb @@ -55,7 +55,7 @@ def destroy def update(profile_params) validate_input(profile_params) - profile_params[:endpoints] = endpoints.map { |endpoint| get_hash_from_object(endpoint)['attributes'] } unless profile_params[:endpoints].nil? + profile_params[:endpoints] = endpoints.map { |endpoint| get_hash_from_object(endpoint)['attributes'] } unless endpoints.nil? merge_attributes(profile_params) profile = service.create_or_update_traffic_manager_profile(traffic_manager_profile_hash) merge_attributes(Fog::TrafficManager::AzureRM::TrafficManagerProfile.parse(profile)) diff --git a/test/integration/application_gateway.rb b/test/integration/application_gateway.rb index 8299d889b..16ce3cc37 100644 --- a/test/integration/application_gateway.rb +++ b/test/integration/application_gateway.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/availability_set.rb b/test/integration/availability_set.rb index 970696232..507ca60eb 100644 --- a/test/integration/availability_set.rb +++ b/test/integration/availability_set.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/blob.rb b/test/integration/blob.rb index 1d5cf2bdf..66626b38e 100644 --- a/test/integration/blob.rb +++ b/test/integration/blob.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/container.rb b/test/integration/container.rb index 191d404f9..f22cfac76 100644 --- a/test/integration/container.rb +++ b/test/integration/container.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/data_disk.rb b/test/integration/data_disk.rb index 768f14269..66320759c 100644 --- a/test/integration/data_disk.rb +++ b/test/integration/data_disk.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/deployment.rb b/test/integration/deployment.rb index bae8eb61d..16e08b1ed 100644 --- a/test/integration/deployment.rb +++ b/test/integration/deployment.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resources = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/express_route_circuit.rb b/test/integration/express_route_circuit.rb index 87f1bd472..c259dd7a0 100644 --- a/test/integration/express_route_circuit.rb +++ b/test/integration/express_route_circuit.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resources = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/external_load_balancer.rb b/test/integration/external_load_balancer.rb index b1f19c3af..3aaaab397 100644 --- a/test/integration/external_load_balancer.rb +++ b/test/integration/external_load_balancer.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/internal_load_balancer.rb b/test/integration/internal_load_balancer.rb index 6bdb9f17f..6ade93d81 100644 --- a/test/integration/internal_load_balancer.rb +++ b/test/integration/internal_load_balancer.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/key_vault.rb b/test/integration/key_vault.rb index aa4dc969e..ff4cc8fe1 100644 --- a/test/integration/key_vault.rb +++ b/test/integration/key_vault.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resources = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/local_network_gateway.rb b/test/integration/local_network_gateway.rb index 037f97f91..2887681e0 100644 --- a/test/integration/local_network_gateway.rb +++ b/test/integration/local_network_gateway.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/managed_disk.rb b/test/integration/managed_disk.rb index 8000d7edb..ef9bccab7 100644 --- a/test/integration/managed_disk.rb +++ b/test/integration/managed_disk.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/network_interface.rb b/test/integration/network_interface.rb index 7f9e537b7..213c84669 100644 --- a/test/integration/network_interface.rb +++ b/test/integration/network_interface.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/network_security_group.rb b/test/integration/network_security_group.rb index 564f54010..35358a498 100644 --- a/test/integration/network_security_group.rb +++ b/test/integration/network_security_group.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/network_security_rule.rb b/test/integration/network_security_rule.rb index ba50ca7f0..4d06f0356 100644 --- a/test/integration/network_security_rule.rb +++ b/test/integration/network_security_rule.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/public_ip.rb b/test/integration/public_ip.rb index 889ef862f..d11e72949 100644 --- a/test/integration/public_ip.rb +++ b/test/integration/public_ip.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/record_set.rb b/test/integration/record_set.rb index 1982fd8dd..fa5c3331f 100644 --- a/test/integration/record_set.rb +++ b/test/integration/record_set.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/resource_group.rb b/test/integration/resource_group.rb index a0e3725dd..f6d43b182 100644 --- a/test/integration/resource_group.rb +++ b/test/integration/resource_group.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/resource_tag.rb b/test/integration/resource_tag.rb index 571e745e9..a271be37e 100644 --- a/test/integration/resource_tag.rb +++ b/test/integration/resource_tag.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resources = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/server.rb b/test/integration/server.rb index 0cf08575e..e267e61bb 100644 --- a/test/integration/server.rb +++ b/test/integration/server.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/server_custom_image.rb b/test/integration/server_custom_image.rb index 6de62969d..ad8ce7e29 100644 --- a/test/integration/server_custom_image.rb +++ b/test/integration/server_custom_image.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/sql_server.rb b/test/integration/sql_server.rb index dcf4e40df..ccf989298 100755 --- a/test/integration/sql_server.rb +++ b/test/integration/sql_server.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resources = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/storage_account.rb b/test/integration/storage_account.rb index 1cd0cbfd4..b94b0f2a5 100644 --- a/test/integration/storage_account.rb +++ b/test/integration/storage_account.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/subnet.rb b/test/integration/subnet.rb index c99424052..3e0c9a920 100644 --- a/test/integration/subnet.rb +++ b/test/integration/subnet.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/traffic_manager.rb b/test/integration/traffic_manager.rb index 872651d25..6ae33782d 100644 --- a/test/integration/traffic_manager.rb +++ b/test/integration/traffic_manager.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resources = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/virtual_machine_extension.rb b/test/integration/virtual_machine_extension.rb index 2bac2032b..a6067d2ea 100644 --- a/test/integration/virtual_machine_extension.rb +++ b/test/integration/virtual_machine_extension.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/virtual_network.rb b/test/integration/virtual_network.rb index c11a8df7b..08ea1438e 100644 --- a/test/integration/virtual_network.rb +++ b/test/integration/virtual_network.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/virtual_network_gateway.rb b/test/integration/virtual_network_gateway.rb index a7455426a..508a54aab 100644 --- a/test/integration/virtual_network_gateway.rb +++ b/test/integration/virtual_network_gateway.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/virtual_network_gateway_connection.rb b/test/integration/virtual_network_gateway_connection.rb index 0f27a421c..4398f2a08 100644 --- a/test/integration/virtual_network_gateway_connection.rb +++ b/test/integration/virtual_network_gateway_connection.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/virtual_network_gateway_connection_to_express_route.rb b/test/integration/virtual_network_gateway_connection_to_express_route.rb index 22d610d3b..edf64c849 100644 --- a/test/integration/virtual_network_gateway_connection_to_express_route.rb +++ b/test/integration/virtual_network_gateway_connection_to_express_route.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) resource = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'], diff --git a/test/integration/zone.rb b/test/integration/zone.rb index 33557b003..8936a5fe8 100644 --- a/test/integration/zone.rb +++ b/test/integration/zone.rb @@ -6,7 +6,7 @@ ###################### Keep it Uncommented! ###################### ######################################################################################################################## -azure_credentials = YAML.load_file('credentials/azure.yml') +azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__)) rs = Fog::Resources::AzureRM.new( tenant_id: azure_credentials['tenant_id'],