Skip to content

Commit ea8f1be

Browse files
authored
Fix integration tests by updating aws-sdk-sqs and replacing moto with LocalStack (#782)
* Increase timeout in integration tests to fix flaky failures * Provide an xml parser engine for aws sdk core version 2 * update aws-sdk-sqs * Remove queue cleanup in integration tests as moto/localstack handle it automatically * Replace moto with LocalStack in integration tests * Replace moto with LocalStack in integration tests * Fix LocalStack service configuration in GitHub Actions
1 parent 5442f47 commit ea8f1be

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

.github/workflows/specs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ jobs:
1313
gemfile: ['Gemfile', 'gemfiles/aws_sdk_core_2.gemfile']
1414
runs-on: ubuntu-20.04
1515
services:
16-
moto_sqs:
17-
image: quay.io/cjlarose/moto-sqs-server:1.1.0
16+
localstack:
17+
image: localstack/localstack:latest
18+
env:
19+
SERVICES: sqs
1820
ports:
19-
- 5000:5000
21+
- 4566:4566
22+
options: >-
23+
--healthcheck-cmd "curl -f http://localhost:4566/_localstack/health"
24+
--healthcheck-interval 5s
25+
--healthcheck-timeout 10s
26+
--healthcheck-retries 5
2027
env:
2128
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
2229
steps:

Gemfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ gemspec
66
group :test do
77
gem 'activejob'
88
gem 'aws-sdk-core', '~> 3'
9-
# Pin to 1.65.0 because of below issues:
10-
# - https://github.com/ruby-shoryuken/shoryuken/pull/753#issuecomment-1822720647
11-
# - https://github.com/getmoto/moto/issues/7054
12-
gem 'aws-sdk-sqs', '1.65.0'
9+
gem 'aws-sdk-sqs'
1310
gem 'codeclimate-test-reporter', require: nil
1411
gem 'httparty'
1512
gem 'multi_xml'

gemfiles/aws_sdk_core_2.gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ group :test do
88
gem "codeclimate-test-reporter", require: nil
99
gem "httparty"
1010
gem "multi_xml"
11+
gem "nokogiri"
1112
gem "simplecov"
1213
gem "webrick"
1314
end

spec/integration/launcher_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
let(:sqs_client) do
88
Aws::SQS::Client.new(
99
region: 'us-east-1',
10-
endpoint: 'http://localhost:5000',
10+
endpoint: 'http://localhost:4566',
1111
access_key_id: 'fake',
1212
secret_access_key: 'fake'
1313
)

0 commit comments

Comments
 (0)