-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4fddf9
commit 191829c
Showing
6 changed files
with
104 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Localstack for AWS services testing | ||
|
||
The AWS related unit, integration and acceptance tests can be tested against localstack. | ||
Use following command to start localstack services. | ||
|
||
```bash | ||
docker compose up | ||
``` | ||
|
||
Use `CTRL-C` or run `docker compose down` from the same directory but from another shell instance. | ||
|
||
Export following environment variables before running Web3Signer tests. | ||
|
||
```bash | ||
export RW_AWS_ACCESS_KEY_ID=test | ||
export RW_AWS_SECRET_ACCESS_KEY=test | ||
export AWS_ACCESS_KEY_ID=test | ||
export AWS_SECRET_ACCESS_KEY=test | ||
export AWS_REGION=us-east-2 | ||
export AWS_ENDPOINT_OVERRIDE=http://127.0.0.1:4566 | ||
``` | ||
|
||
To import above in IntelliJ IDEA Run configurations: | ||
``` | ||
RW_AWS_ACCESS_KEY_ID=test | ||
RW_AWS_SECRET_ACCESS_KEY=test | ||
AWS_ACCESS_KEY_ID=test | ||
AWS_SECRET_ACCESS_KEY=test | ||
AWS_REGION=us-east-2 | ||
AWS_ENDPOINT_OVERRIDE=http://127.0.0.1:4566 | ||
``` | ||
|
||
Run gradle tests. | ||
```bash | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
services: | ||
# see https://docs.localstack.cloud/getting-started/installation/#docker-compose | ||
# see https://docs.localstack.cloud/references/configuration/ | ||
localstack: | ||
container_name: "${LOCALSTACK_DOCKER_NAME-localstack_main}" | ||
image: localstack/localstack | ||
ports: | ||
- "127.0.0.1:4566:4566" # LocalStack Gateway | ||
- "127.0.0.1:4510-4559:4510-4559" # external services port range | ||
environment: | ||
# LocalStack configuration | ||
- DEBUG=${DEBUG-} | ||
- DOCKER_HOST=unix:///var/run/docker.sock | ||
- SERVICES=secretsmanager,kms | ||
- EAGER_SERVICE_LOADING=1 | ||
# AWS Configuration | ||
- AWS_ACCESS_KEY_ID=test | ||
- AWS_SECRET_ACCESS_KEY=test | ||
- AWS_DEFAULT_REGION=us-east-2 | ||
- AWS_SESSION_TOKEN=test | ||
- AWS_SESSION_TOKEN=test | ||
# ready hook script configuration | ||
volumes: | ||
#- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack" | ||
#- "./init/ready.d:/etc/localstack/init/ready.d" # ready hooks | ||
- "${DOCKER_HOST_PATH:-/var/run/docker.sock}:/var/run/docker.sock" |