tests/requests/compute/image_tests.rb in fog-aws-3.3.0 vs tests/requests/compute/image_tests.rb in fog-aws-3.4.0
- old
+ new
@@ -35,10 +35,15 @@
@modify_image_attribute_format = {
'return' => Fog::Boolean,
'requestId' => String
}
+ @describe_image_attribute_format = {
+ 'requestId' => String,
+ 'imageId' => String,
+ 'launchPermission' => [Fog::Nullable::String]
+ }
@create_image_format = {
'requestId' => String,
'imageId' => String
}
@@ -109,9 +114,13 @@
@other_account.describe_images('image-id' => @image_id).body['imagesSet']
end
tests("#modify_image_attribute('#{@image_id}', 'Add.UserId' => ['#{@other_account.data[:owner_id]}'])").formats(@modify_image_attribute_format) do
Fog::Compute[:aws].modify_image_attribute(@image_id, { 'Add.UserId' => [@other_account.data[:owner_id]] }).body
+ end
+
+ tests("#describe_image_attribute('#{@image_id}', 'launchPermission'])").formats(@describe_image_attribute_format) do
+ Fog::Compute[:aws].describe_image_attribute(@image_id, 'launchPermission' ).body
end
tests("other_account#describe_images('image-id' => '#{@image_id}')").returns([@image_id]) do
@other_account.describe_images('image-id' => @image_id).body['imagesSet'].map {|i| i['imageId'] }
end