Skip to content

Commit

Permalink
Fix template.yml test entrypoints
Browse files Browse the repository at this point in the history
  • Loading branch information
kddejong committed Apr 4, 2024
1 parent 9de0c0e commit a8b1740
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
python: [ 3.8, 3.9 ]
python: [ "3.8", "3.9", "3.10", "3.11"]
node: [ 20 ]
env:
SAM_CLI_TELEMETRY: "0"
Expand Down
7 changes: 6 additions & 1 deletion python/rpdk/typescript/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,15 @@ def _copy_resource(path, resource_name=None):
"Runtime": project.runtime,
"CodeUri": self.CODE_URI,
}
test_handler_params = {
**handler_params,
"Handler": project.test_entrypoint,
}
_render_template(
project.root / "template.yml",
resource_type=project.type_name,
params=handler_params,
handler_params=handler_params,
test_handler_params=test_handler_params,
)

LOG.debug("Init complete")
Expand Down
4 changes: 2 additions & 2 deletions python/rpdk/typescript/templates/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Resources:
TestEntrypoint:
Type: AWS::Serverless::Function
Properties:
{% for key, value in params.items() %}
{% for key, value in test_handler_params.items() %}
{{ key }}: {{ value }}
{% endfor %}

TypeFunction:
Type: AWS::Serverless::Function
Properties:
{% for key, value in params.items() %}
{% for key, value in handler_params.items() %}
{{ key }}: {{ value }}
{% endfor %}
Metadata:
Expand Down

0 comments on commit a8b1740

Please sign in to comment.