Skip to content

Commit

Permalink
fix: integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petrisorciprian-vitals committed Nov 15, 2023
1 parent a2fb1c9 commit 2574b0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/consumer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import {
DeleteMessageBatchCommandInput,
ReceiveMessageCommand,
ReceiveMessageCommandInput,
ReceiveMessageCommandOutput
ReceiveMessageCommandOutput,
QueueAttributeName
} from '@aws-sdk/client-sqs';

import { ConsumerOptions, StopOptions, UpdatableOptions } from './types';
Expand Down Expand Up @@ -198,7 +199,7 @@ export class Consumer extends TypedEventEmitter {
let currentPollingTimeout = this.pollingWaitTimeMs;
this.receiveMessage({
QueueUrl: this.queueUrl,
AttributeNames: this.attributeNames,
AttributeNames: this.attributeNames as QueueAttributeName[],
MessageAttributeNames: this.messageAttributeNames,
MaxNumberOfMessages: this.batchSize,
WaitTimeSeconds: this.waitTimeSeconds,
Expand Down
8 changes: 3 additions & 5 deletions test/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ version: '3'
services:
localstack:
container_name: local_sqs_aws
image: localstack/localstack:1.2.0@sha256:41216e34e25546654c58b8075b133027eab3d958e605ef2e7af168d1f05a9364
command: sh -c "/usr/local/bin/init.sh && exec myexecutable"
image: localstack/localstack:latest@sha256:da35c19b83b646b2f4511b62f39689bc73cf0fe53ac4159dfd513e9774356324
environment:
- AWS_DEFAULT_REGION=eu-west-1
- EDGE_PORT=4566
Expand All @@ -17,11 +16,10 @@ services:
ports:
- "4566-4599:4566-4599"
volumes:
- '${TMPDIR:-/tmp/localstack}:/tmp/localstack'
- '/var/run/docker.sock:/var/run/docker.sock'
- ./localstack:/docker-entrypoint-initaws.d
- ./localstack:/etc/localstack/init/ready.d
healthcheck:
test: curl http://localhost:4566/health || exit 1
test: curl http://localhost:4566/_localstack/health || exit 1
interval: 20s
retries: 5
start_period: 20s
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/initIntTests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker-compose --file ./test/scripts/docker-compose.yml up -d
docker compose --file ./test/scripts/docker-compose.yml up -d

if [ $? -eq 0 ]
then
Expand Down
Empty file modified test/scripts/localstack/init.sh
100644 → 100755
Empty file.

0 comments on commit 2574b0d

Please sign in to comment.