Skip to content

Commit 6dff1ae

Browse files
committed
test(integration): add make target to run AWS LocalStack
1 parent c23c931 commit 6dff1ae

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,15 @@ start-postgres: ## Run the PostgreSQL 16 docker container
516516
@docker run --rm --name postgres -p 5432:5432 -d -e POSTGRES_PASSWORD=password -e POSTGRES_DB=rollupsdb -v $(CURDIR)/test/postgres/init-test-db.sh:/docker-entrypoint-initdb.d/init-test-db.sh postgres:18-alpine
517517
@$(MAKE) migrate
518518

519+
start-awslocalstack: ## Run the AWS LocalStack docker container
520+
@echo "Starting AWS localstack"
521+
@docker run --rm --name awslocalstack -p 127.0.0.1:4566:4566 -d -e SERVICES=kms localstack/localstack:4.14.0
522+
@echo "Add the following variables to run integration test with AWS services:"
523+
@echo " export AWS_ACCESS_KEY_ID=test"
524+
@echo " export AWS_SECRET_ACCESS_KEY=test"
525+
@echo " export LOCALSTACK_KMS_ENDPOINT=http://localhost:4566"
526+
@echo " export LOCALSTACK_KMS_REQUIRED=true"
527+
519528
start: start-postgres start-devnet ## Start the anvil devnet and PostgreSQL 16 docker containers
520529

521530
stop-devnet: ## Stop the anvil devnet docker container
@@ -524,6 +533,9 @@ stop-devnet: ## Stop the anvil devnet docker container
524533
stop-postgres: ## Stop the PostgreSQL 16 docker container
525534
@docker stop postgres || true
526535

536+
stop-awslocalstack: ## Stop the AWS LocalStack docker container
537+
@docker stop awslocalstack || true
538+
527539
stop: stop-devnet stop-postgres ## Stop all running docker containers
528540

529541
restart-devnet: ## Restart the anvil devnet docker container

0 commit comments

Comments
 (0)