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:
parent
449fb4b6d7
commit
0cd44b71db
2 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -109,10 +109,16 @@ Shindo.tests('AWS::Kinesis | stream requests', ['aws', 'kinesis']) do
|
|||
end
|
||||
end
|
||||
|
||||
tests("#describe_stream").formats(@describe_stream_format) do
|
||||
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
|
||||
records = [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue