Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dev = [
"boto3-stubs[firehose,s3,sts,organizations,lambda]==1.28.80",
"psycopg[binary]==3.2.9",
"tqdm==4.67.1",
"moto[firehose,awslambda,apigateway,proxy,sts]==5.0.19",
"moto[firehose,awslambda,apigateway,proxy,sts]==5.2.2",
"yamllint==1.37.1",
]

Expand Down
6 changes: 1 addition & 5 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/bash
set -euxo pipefail

# Moto needs a special image for running lamda's as part of a test suite
# These are third party supported. The default ones don't support python 3.12.
# This one does, but might need revisiting.
# Context: https://github.com/getmoto/moto/issues/8236
MOTO_DOCKER_LAMBDA_IMAGE=shogo82148/lambda-python:3.12.2024.10.18 uv run pytest
uv run pytest
8 changes: 5 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,11 @@ def cdk(mock_aws_services):
for resource in cf_mock.describe_stack_resources(StackName="Test")[
"StackResources"
]:
if resource["ResourceType"] == "AWS::Lambda::Function" and resource[
"PhysicalResourceId"
].startswith("ingest-"):
if resource.get(
"ResourceType"
) == "AWS::Lambda::Function" and resource.get(
"PhysicalResourceId", ""
).startswith("ingest-"):
Comment on lines -169 to +173

@chris48s chris48s Jul 16, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't 100% explain this, but in the newer version of moto, not all dicts returned by describe_stack_resources() has all of these keys. I've just used .get() on both ResourceType and PhysicalResourceId so the incomplete entries are skipped.

test_data["ingest_functions"].append(resource["PhysicalResourceId"])
test_data["function_name"] = resource["PhysicalResourceId"]
yield test_data
41 changes: 7 additions & 34 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading