From ebd12d27e675759baa9869c63d2ef7a53d44d2e2 Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Wed, 20 Mar 2024 11:35:31 +0900 Subject: [PATCH] Set random id to SQS stub message See https://github.com/aws/aws-sdk-ruby/pull/2918 --- spec/ecs_deploy/auto_scaler/instance_drainer_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/ecs_deploy/auto_scaler/instance_drainer_spec.rb b/spec/ecs_deploy/auto_scaler/instance_drainer_spec.rb index 074a9d1..b7a5290 100644 --- a/spec/ecs_deploy/auto_scaler/instance_drainer_spec.rb +++ b/spec/ecs_deploy/auto_scaler/instance_drainer_spec.rb @@ -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" @@ -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