https://github.com/localstack-samples/basic-pod-integration-test
Basic LocalStack integration test using LocalStack Pods
https://github.com/localstack-samples/basic-pod-integration-test
Last synced: 9 months ago
JSON representation
Basic LocalStack integration test using LocalStack Pods
- Host: GitHub
- URL: https://github.com/localstack-samples/basic-pod-integration-test
- Owner: localstack-samples
- License: other
- Archived: true
- Created: 2023-09-05T23:18:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-06T02:08:35.000Z (over 2 years ago)
- Last Synced: 2025-02-17T14:44:42.747Z (10 months ago)
- Language: Python
- Size: 53.7 KB
- Stars: 1
- Watchers: 15
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# basic-pod-integration-test
Basic LocalStack integration test using LocalStack Pods.
This is a basic example of how LocalStack CloudPods can be used to inject state into
your AWS services for integration testing.
You can find the test in [test_pod.py](./auto_tests/python/test_pod.py).

## Setup
1. From the working directory:
Set your LocalStack pro key. Add this line of code to a file named `.env-gdc-local` at the root of this project.
Set your actual LocalStack key.
```bash
export LOCALSTACK_API_KEY=
```
2. Setup an AWS_PROFILE for LocalStack
#### Add this to your `~/.aws/config` file
```text
[profile localstack]
region=us-east-1
output=json
endpoint_url = http://localhost:4566
```
#### Add this to your `~/.aws/credentials` file
```text
[localstack]
aws_access_key_id=test
aws_secret_access_key=test
```
# Test Setup
We need to generate a CloudPod with state in it for the test.
With LocalStack running
```shell
make test-setup
```
Now restart LocalStack
```shell
make stop-localstack
make start-localstack
```
## Run Python Integration Test
```shell
make test
```