Skip to content

Commit 0c47338

Browse files
Use localhost for dynamodb connection when running lambda and dynamodb running in localstack on GHA.
1 parent 8cc6375 commit 0c47338

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/stage-4-acceptance.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ jobs:
110110
runs-on: ubuntu-latest
111111
needs: environment-set-up
112112
timeout-minutes: 10
113+
env:
114+
TEST_DYNAMODB_ENDPOINT: http://localhost:4566/
113115
steps:
114116
- name: "Checkout code"
115117
uses: actions/checkout@v4

tests/integration/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
from collections.abc import Generator
34
from pathlib import Path
45
from typing import Any
@@ -84,7 +85,7 @@ def flask_function(lambda_client: BaseClient) -> str:
8485
Timeout=180,
8586
Environment={
8687
"Variables": {
87-
"DYNAMODB_ENDPOINT": "http://host.docker.internal:4566",
88+
"DYNAMODB_ENDPOINT": os.getenv("TEST_DYNAMODB_ENDPOINT", "http://host.docker.internal:4566"),
8889
"AWS_REGION": AWS_REGION,
8990
}
9091
},

0 commit comments

Comments
 (0)