test/models/compute/test_server.rb in fog-azure-rm-0.2.7 vs test/models/compute/test_server.rb in fog-azure-rm-0.3.0
- old
+ new
@@ -49,11 +49,11 @@
:ssh_key_path,
:ssh_key_data,
:platform,
:provision_vm_agent,
:enable_automatic_updates,
- :network_interface_card_id,
+ :network_interface_card_ids,
:availability_set_id
]
attributes.each do |attribute|
assert_respond_to @server, attribute
end
@@ -61,9 +61,15 @@
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
+ end
+
+ # Async
+ async_response = Concurrent::Promise.execute { 10 }
+ @service.stub :create_virtual_machine, async_response do
+ assert_instance_of Concurrent::Promise, @server.save(true)
end
end
def test_save_method_response_for_windows_vm
response = ApiStub::Models::Compute::Server.create_windows_virtual_machine_response(@compute_client)