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

cleaning up/repairing errant tests

This commit is contained in:
geemus 2010-10-12 16:01:17 -07:00
parent 56b114d5c7
commit 856334fe38
8 changed files with 33 additions and 23 deletions

View file

@ -15,14 +15,15 @@ module Fog
identity :id
attribute :memory
attribute :storage
attribute :hostname
attribute :cpu
attribute :ips
attribute :status
attribute :description
attribute :flavor_id
attribute :hostname
attribute :image_id
attribute :ips
attribute :memory
attribute :status
attribute :storage
attribute :template
attr_accessor :password

View file

@ -26,7 +26,7 @@ module Fog
class Mock
def get_slices
def get_blocks
Fog::Mock.not_implemented
end

View file

@ -13,14 +13,15 @@ Shindo.tests('AWS::Compute | image requests', ['aws']) do
'kernelId' => String,
'productCodes' => [],
'ramdiskId' => String,
'rootDeviceType' => String
'rootDeviceType' => String,
'tagSet' => {}
}],
'requestId' => String,
}
tests('success') do
# the result for this is HUGE an relatively uninteresting...de
# the result for this is HUGE and relatively uninteresting...
# tests("#describe_images").formats(@images_format) do
# AWS[:compute].describe_images.body
# end

View file

@ -42,7 +42,8 @@ Shindo.tests('AWS::Compute | instance requests', ['aws']) do
'ipAddress' => String,
'privateDnsName' => String,
'privateIpAddress' => String,
'stateReason' => {}
'stateReason' => {},
'tagSet' => {}
)],
'ownerId' => String,
'reservationId' => String

View file

@ -13,7 +13,7 @@ Shindo.tests('AWS::Compute | snapshot requests', ['aws']) do
@snapshots_format = {
'requestId' => String,
'snapshotSet' => [@snapshot_format]
'snapshotSet' => [@snapshot_format.merge('tagSet' => {})]
}
@volume = AWS[:compute].volumes.create(:availability_zone => 'us-east-1a', :size => 1)

View file

@ -1,15 +1,16 @@
Shindo.tests('Bluebox::Compute | block requests', ['bluebox']) do
@block_format = {
'cpu' => Float,
'hostname' => String,
'id' => String,
'ips' => [{'address' => String}],
'memory' => Integer,
'product' => Bluebox::Compute::Formats::PRODUCT,
'status' => String,
'storage' => Integer,
'template' => String
'cpu' => Float,
'description' => String,
'hostname' => String,
'id' => String,
'ips' => [{'address' => String}],
'memory' => Integer,
'product' => Bluebox::Compute::Formats::PRODUCT,
'status' => String,
'storage' => Integer,
'template' => String
}
tests('success') do

View file

@ -4,13 +4,13 @@ Shindo.tests('Rackspace::Compute | image requests', ['rackspace']) do
'id' => Integer,
'name' => String,
'status' => String,
'updated' => String
'updated' => String,
'serverId' => Integer,
}
@image_format = @images_format.merge({
'created' => String,
'progress' => Integer,
'serverId' => Integer,
})
tests('success') do
@ -19,7 +19,7 @@ Shindo.tests('Rackspace::Compute | image requests', ['rackspace']) do
@server.wait_for { ready? }
@image_id = nil
tests("#create_image(#{@server.id})").formats(@images_format) do
tests("#create_image(#{@server.id})").formats(@images_format.merge('serverId' => Integer)) do
data = Rackspace[:compute].create_image(@server.id).body['image']
@image_id = data['id']
data
@ -27,7 +27,7 @@ Shindo.tests('Rackspace::Compute | image requests', ['rackspace']) do
Rackspace[:compute].images.get(@image_id).wait_for { ready? }
tests("#get_image_details(#{@image_id})").formats(@image_format) do
tests("#get_image_details(#{@image_id})").formats(@images_format) do
Rackspace[:compute].get_image_details(@image_id).body['image']
end

View file

@ -40,14 +40,20 @@ Shindo.tests('Rackspace::Compute | server requests', ['rackspace']) do
Rackspace[:compute].list_servers_detail.body
end
Rackspace[:compute].servers.get(@server_id).wait_for { ready? }
tests("#update_server(#{@server_id}, :name => 'fogupdatedserver', :adminPass => 'fogupdatedserver')").succeeds do
Rackspace[:compute].update_server(@server_id, :name => 'fogupdatedserver', :adminPass => 'fogupdatedserver')
end
Rackspace[:compute].servers.get(@server_id).wait_for { ready? }
tests("#reboot_server(#{@server_id}, 'HARD')").succeeds do
Rackspace[:compute].reboot_server(@server_id, 'HARD')
end
Rackspace[:compute].servers.get(@server_id).wait_for { ready? }
tests("#reboot_server(#{@server_id}, 'SOFT')").succeeds do
Rackspace[:compute].reboot_server(@server_id, 'SOFT')
end