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

[compute|aws] Fix & improve some tests.

Use m1.small flavor with gentoo ami; smallest
flavor that supports instance storage.

Expect nullable strings for these attributes:
* snapshot descriptions
* tag descriptions
* volume snapshotIds

Whitespace cleanup.
This commit is contained in:
Aaron Suggs 2011-04-27 16:19:19 -04:00
parent 2e7d255322
commit 8050770377
7 changed files with 13 additions and 13 deletions

View file

@ -1,8 +1,8 @@
Shindo.tests("AWS::Compute | address", ['aws']) do
model_tests(AWS[:compute].addresses, {}, true) do
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI)
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI, :flavor_id => 'm1.small')
@server.wait_for { ready? }
tests('#server=').succeeds do

View file

@ -4,7 +4,7 @@ Shindo.tests("AWS::Compute | snapshot", ['aws']) do
@volume.wait_for { ready? }
model_tests(AWS[:compute].snapshots, {:volume_id => @volume.identity}, true)
@volume.destroy
end
end

View file

@ -1,12 +1,12 @@
Shindo.tests("AWS::Compute | volume", ['aws']) do
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI)
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI, :flavor_id => 'm1.small')
@server.wait_for { ready? }
model_tests(AWS[:compute].volumes, {:availability_zone => @server.availability_zone, :size => 1, :device => '/dev/sdz1'}, true) do
@instance.wait_for { ready? }
tests('#server = @server').succeeds do
@instance.server = @server
end
@ -23,4 +23,4 @@ Shindo.tests("AWS::Compute | volume", ['aws']) do
@server.destroy
end
end

View file

@ -8,7 +8,7 @@ Shindo.tests('AWS::Compute | address requests', ['aws']) do
'requestId' => String
}
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI)
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI, :flavor_id => 'm1.small')
@server.wait_for { ready? }
@ip_address = @server.ip_address

View file

@ -1,7 +1,7 @@
Shindo.tests('AWS::Compute | snapshot requests', ['aws']) do
@snapshot_format = {
'description' => NilClass,
'description' => Fog::Nullable::String,
'ownerId' => String,
'progress' => String,
'snapshotId' => String,

View file

@ -5,7 +5,7 @@ Shindo.tests('AWS::Compute | tag requests', ['aws']) do
'key' => String,
'resourceId' => String,
'resourceType' => String,
'value' => String
'value' => Fog::Nullable::String
}],
'requestId' => String
}

View file

@ -5,7 +5,7 @@ Shindo.tests('AWS::Compute | volume requests', ['aws']) do
'createTime' => Time,
'requestId' => String,
'size' => Integer,
'snapshotId' => NilClass,
'snapshotId' => Fog::Nullable::String,
'status' => String,
'volumeId' => String
}
@ -25,7 +25,7 @@ Shindo.tests('AWS::Compute | volume requests', ['aws']) do
'attachmentSet' => [],
'createTime' => Time,
'size' => Integer,
'snapshotId' => NilClass,
'snapshotId' => Fog::Nullable::String,
'status' => String,
'tagSet' => {},
'volumeId' => String
@ -33,7 +33,7 @@ Shindo.tests('AWS::Compute | volume requests', ['aws']) do
'requestId' => String
}
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI)
@server = AWS[:compute].servers.create(:image_id => GENTOO_AMI, :flavor_id => 'm1.small')
@server.wait_for { ready? }
tests('success') do