Skip to content

Commit

Permalink
chore: switching to Podman
Browse files Browse the repository at this point in the history
switches the testing to podman rather than docker, this is due to some issues with login, it's just easier to use podman
  • Loading branch information
nicholasgriffintn committed Jan 28, 2025
1 parent 7bc55fc commit 3dab462
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
5 changes: 5 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 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

0 comments on commit 3dab462

Please sign in to comment.