mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Refactor create_stream mock
This commit is contained in:
parent
01bae5ee53
commit
44d05ede46
1 changed files with 2 additions and 3 deletions
|
@ -33,9 +33,6 @@ module Fog
|
||||||
shard_count = options.delete("ShardCount") || 1
|
shard_count = options.delete("ShardCount") || 1
|
||||||
stream_arn = "arn:aws:kinesis:#{@region}:#{@account_id}:stream/#{stream_name}"
|
stream_arn = "arn:aws:kinesis:#{@region}:#{@account_id}:stream/#{stream_name}"
|
||||||
|
|
||||||
response = Excon::Response.new
|
|
||||||
response.status = 200
|
|
||||||
|
|
||||||
if data[:kinesis_streams].detect{ |s| s["StreamName"] == stream_name }
|
if data[:kinesis_streams].detect{ |s| s["StreamName"] == stream_name }
|
||||||
raise 'stream already exists'
|
raise 'stream already exists'
|
||||||
end
|
end
|
||||||
|
@ -62,6 +59,8 @@ module Fog
|
||||||
"Shards" => shards,
|
"Shards" => shards,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
|
response = Excon::Response.new
|
||||||
|
response.status = 200
|
||||||
response.body = ""
|
response.body = ""
|
||||||
response
|
response
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue