1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace] A test to reveal a bug in server.create

This commit is contained in:
Joonas Reynders 2013-09-30 10:16:40 +03:00
parent ffe7946ee4
commit dcffbc7584

View file

@ -9,7 +9,7 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
options = {
:name => "fog_server_#{Time.now.to_i.to_s}",
:flavor_id => rackspace_test_flavor_id(service),
:image_id => rackspace_test_image_id(service),
:image_id => rackspace_test_image_id(service),
:metadata => { 'fog_test' => 'true' },
:networks => [@network.id]
}
@ -76,6 +76,13 @@ Shindo.tests('Fog::Compute::RackspaceV2 | server', ['rackspace']) do
@instance.addresses.keys.include?(@network.label)
end
tests('#create').succeeds do
pending unless Fog.mocking?
original_options = Marshal.load(Marshal.dump(options))
@instance.create(options)
returns(true) { original_options == options }
end
tests('#update').succeeds do
new_name = "fog_server_update#{Time.now.to_i.to_s}"
@instance.name = new_name