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

Test ResourceNotFound for #put_records

This commit is contained in:
Michael Hale 2015-07-02 18:15:00 -04:00
parent 5037c97b90
commit c6e1d95cf3

View file

@ -31,7 +31,7 @@ Shindo.tests('AWS::Kinesis | stream requests', ['aws', 'kinesis']) do
end end
end end
tests("#put_records").formats(AWS::Kinesis::Formats::PUT_RECORDS_FORMAT, false) do tests("#put_records") do
records = [ records = [
{ {
"Data" => Base64.encode64("foo").chomp!, "Data" => Base64.encode64("foo").chomp!,
@ -42,9 +42,17 @@ Shindo.tests('AWS::Kinesis | stream requests', ['aws', 'kinesis']) do
"PartitionKey" => "1" "PartitionKey" => "1"
} }
] ]
tests("success").formats(AWS::Kinesis::Formats::PUT_RECORDS_FORMAT, false) do
Fog::AWS[:kinesis].put_records("StreamName" => @stream_id, "Records" => records).body Fog::AWS[:kinesis].put_records("StreamName" => @stream_id, "Records" => records).body
end end
tests("ResourceNotFound").raises(Fog::AWS::Kinesis::ResourceNotFound) do
Fog::AWS[:kinesis].put_records("StreamName" => @stream_id + "-foo", "Records" => records).body
end
end
tests("#put_record").formats(AWS::Kinesis::Formats::PUT_RECORD_FORMAT) do tests("#put_record").formats(AWS::Kinesis::Formats::PUT_RECORD_FORMAT) do
Fog::AWS[:kinesis].put_record("StreamName" => @stream_id, "Data" => Base64.encode64("baz").chomp!, "PartitionKey" => "1").body Fog::AWS[:kinesis].put_record("StreamName" => @stream_id, "Data" => Base64.encode64("baz").chomp!, "PartitionKey" => "1").body
end end