Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install Podman
run: |
sudo apt-get update
sudo apt-get install -y podman podman-compose

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -50,6 +55,11 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install Podman
run: |
sudo apt-get update
sudo apt-get install -y podman podman-compose

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down
28 changes: 22 additions & 6 deletions test/scripts/initIntTests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,37 @@
docker compose --file ./test/scripts/docker-compose.yml up -d
#!/bin/sh
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)

# Setup AWS credentials
mkdir -p ~/.aws
cat > ~/.aws/credentials << EOF
[default]
aws_access_key_id = key
aws_secret_access_key = secret
region = eu-west-1
EOF

cd "${SCRIPT_DIR}"
podman-compose up -d

if [ $? -eq 0 ]
then
echo "Successfully started docker"
echo "Successfully started podman containers"
else
echo "Could not start docker" >&2
echo "Could not start podman containers" >&2
exit 1
fi

# Export these for LocalStack
export AWS_ACCESS_KEY_ID="key"
export AWS_SECRET_ACCESS_KEY="secret"
export AWS_DEFAULT_REGION="eu-west-1"
# Disable AWS CLI pager
export AWS_PAGER=""

echo "Waiting for SQS, attempting every 5s"
until $(aws --endpoint-url=http://localhost:4566 sqs get-queue-url --queue-name sqs-consumer-data --region eu-west-1 | grep "{
"QueueUrl": "http://localhost:4566/000000000000/sqs-consumer-data"
}" > /dev/null); do
until aws --endpoint-url=http://localhost:4566 sqs get-queue-url --queue-name sqs-consumer-data --region eu-west-1 | grep "{
\"QueueUrl\": \"http://localhost:4566/000000000000/sqs-consumer-data\"
}" > /dev/null; do
printf '.'
sleep 5
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ services:
- SERVICES=sqs
- AWS_ACCESS_KEY_ID=key
- AWS_SECRET_ACCESS_KEY=secret
- DOCKER_HOST=unix:///var/run/docker.sock
- DEBUG=1
ports:
- "4566-4599:4566-4599"
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
- ./localstack:/etc/localstack/init/ready.d
- './localstack:/etc/localstack/init/ready.d:Z'
healthcheck:
test: curl http://localhost:4566/_localstack/health | jq '.services.sqs' | grep -q -x 'running'
interval: 20s
retries: 5
start_period: 20s
timeout: 10s
timeout: 10s
Loading