Skip to content

Commit

Permalink
Set random id to SQS stub message
Browse files Browse the repository at this point in the history
  • Loading branch information
okkez committed Mar 20, 2024
1 parent 5a4de3a commit ebd12d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spec/ecs_deploy/auto_scaler/instance_drainer_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
require "spec_helper"

require "securerandom"

require "ecs_deploy/auto_scaler/auto_scaling_group_config"
require "ecs_deploy/auto_scaler/instance_drainer"

Expand Down Expand Up @@ -35,6 +37,7 @@
let(:messages) do
instances.map do |i|
{
message_id: SecureRandom.uuid,
body: %Q|{"version":"0","id":"478e68b4-9ad3-1fb4-e8a2-aef2d793738d","detail-type":"EC2 Spot Instance Interruption Warning","source":"aws.ec2","account":"1234","time":"2019-10-05T14:19:37Z","region":"ap-northeast-1","resources":["arn:aws:ec2:ap-northeast-1a:instance/#{i[:instance_id]}"],"detail":{"instance-id":"#{i[:instance_id]}","instance-action":"terminate"}}|,
}
end
Expand Down

0 comments on commit ebd12d2

Please sign in to comment.