2011-06-27 20:45:37 -04:00
|
|
|
Shindo.tests('Fog::Compute[:aws] | spot datafeed subscription requests', ['aws']) do
|
|
|
|
@spot_datafeed_subscription_format = {
|
|
|
|
'spotDatafeedSubscription' => {
|
|
|
|
'bucket' => String,
|
|
|
|
'ownerId' => String,
|
|
|
|
'prefix' => String,
|
|
|
|
'state' => String
|
|
|
|
},
|
|
|
|
'requestId' => String
|
|
|
|
}
|
|
|
|
|
|
|
|
@directory = Fog::Storage[:aws].directories.create(:key => 'fogspotdatafeedsubscriptiontests')
|
|
|
|
|
|
|
|
tests('success') do
|
2011-07-08 20:10:36 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-27 20:45:37 -04:00
|
|
|
|
|
|
|
tests("#create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/')").formats(@spot_datafeed_subscription_format) do
|
|
|
|
Fog::Compute[:aws].create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/').body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("duplicate #create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/')").succeeds do
|
|
|
|
Fog::Compute[:aws].create_spot_datafeed_subscription('fogspotdatafeedsubscriptiontests', 'fogspotdatafeedsubscription/')
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#describe_spot_datafeed_subscription").formats(@spot_datafeed_subscription_format) do
|
|
|
|
Fog::Compute[:aws].describe_spot_datafeed_subscription.body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("#delete_spot_datafeed_subscription").formats(AWS::Compute::Formats::BASIC) do
|
|
|
|
Fog::Compute[:aws].delete_spot_datafeed_subscription.body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests("duplicate #delete_spot_datafeed_subscription").succeeds do
|
|
|
|
Fog::Compute[:aws].delete_spot_datafeed_subscription
|
|
|
|
end
|
|
|
|
end
|
2011-07-08 20:10:36 -04:00
|
|
|
|
2011-06-27 20:45:37 -04:00
|
|
|
tests('failure') do
|
2011-07-08 20:10:36 -04:00
|
|
|
pending if Fog.mocking?
|
2011-06-27 20:45:37 -04:00
|
|
|
|
|
|
|
tests("#describe_spot_datafeed_subscription").raises(Fog::Compute::AWS::NotFound) do
|
|
|
|
Fog::Compute[:aws].describe_spot_datafeed_subscription
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
@directory.destroy
|
|
|
|
end
|