Skip to content

Commit e4ffd88

Browse files
committed
Add integration test for virtual machine size
1 parent d693959 commit e4ffd88

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require 'fog/azurerm'
2+
require 'yaml'
3+
4+
azure_credentials = YAML.load_file(File.expand_path('credentials/azure.yml', __dir__))
5+
6+
compute = Fog::Compute::AzureRM.new(
7+
tenant_id: azure_credentials['tenant_id'],
8+
client_id: azure_credentials['client_id'],
9+
client_secret: azure_credentials['client_secret'],
10+
subscription_id: azure_credentials['subscription_id']
11+
)
12+
13+
########################################################################################################################
14+
###################### List virtual machine sizes ######################
15+
########################################################################################################################
16+
17+
begin
18+
puts 'List of virtual machine sizes:'
19+
virtual_machine_sizes = compute.virtual_machine_sizes(location: LOCATION)
20+
virtual_machine_sizes.each do |virtual_machine_size|
21+
puts "- #{virtual_machine_size.name}"
22+
end
23+
24+
puts 'Integration Test for virtual machine size ran successfully!'
25+
rescue
26+
puts 'Integration Test for virtual machine size is failing!'
27+
end

0 commit comments

Comments
 (0)