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

Test describe_streams for ResourceNotFound

This commit is contained in:
Michael Hale 2015-07-02 17:07:20 -04:00
parent 449fb4b6d7
commit 0cd44b71db
2 changed files with 9 additions and 3 deletions

View file

@ -37,7 +37,7 @@ module Fog
stream_name = options.delete("StreamName")
unless stream = data[:kinesis_streams].detect{ |s| s["StreamName"] == stream_name }
raise 'unknown stream'
raise Fog::AWS::Kinesis::ResourceNotFound.new("Stream #{stream_name} under account #{@account_id} not found.")
end
# Strip Records key out of shards for response

View file

@ -109,8 +109,14 @@ Shindo.tests('AWS::Kinesis | stream requests', ['aws', 'kinesis']) do
end
end
tests("#describe_stream").formats(@describe_stream_format) do
Fog::AWS[:kinesis].describe_stream("StreamName" => @stream_id).body
tests("#describe_stream") do
tests("success").formats(@describe_stream_format) do
Fog::AWS[:kinesis].describe_stream("StreamName" => @stream_id).body
end
tests("ResourceNotFound").raises(Fog::AWS::Kinesis::ResourceNotFound) do
Fog::AWS[:kinesis].describe_stream("StreamName" => @stream_id + "-foo").body
end
end
tests("#put_records").formats(@put_records_format, false) do