test/models/compute/test_server.rb in fog-azure-rm-temp-0.0.4 vs test/models/compute/test_server.rb in fog-azure-rm-temp-0.0.5
- old
+ new
@@ -52,21 +52,28 @@
:ssh_key_data,
:platform,
:provision_vm_agent,
:enable_automatic_updates,
:network_interface_card_ids,
- :availability_set_id
+ :availability_set_id,
+ :managed_disk_storage_type,
+ :os_disk_size,
+ :tags,
+ :platform_update_domain,
+ :platform_fault_domain
]
attributes.each do |attribute|
assert_respond_to @server, attribute
end
end
def test_save_method_response_for_linux_vm
response = ApiStub::Models::Compute::Server.create_linux_virtual_machine_response(@compute_client)
@service.stub :create_virtual_machine, response do
- assert_instance_of Fog::Compute::AzureRM::Server, @server.save
+ @service.stub :get_virtual_machine, response do
+ assert_instance_of Fog::Compute::AzureRM::Server, @server.save
+ end
end
# Async
async_response = Concurrent::Promise.execute { 10 }
@service.stub :create_virtual_machine, async_response do
@@ -75,11 +82,13 @@
end
def test_save_method_response_for_windows_vm
response = ApiStub::Models::Compute::Server.create_windows_virtual_machine_response(@compute_client)
@service.stub :create_virtual_machine, response do
- assert_instance_of Fog::Compute::AzureRM::Server, @server.save
- refute @server.save.disable_password_authentication
+ @service.stub :get_virtual_machine, response do
+ assert_instance_of Fog::Compute::AzureRM::Server, @server.save
+ refute @server.save.disable_password_authentication
+ end
end
end
def test_destroy_method_response
@service.stub :delete_virtual_machine, true do