Skip to content

Commit dcd56b3

Browse files
committed
Fix template.yml test entrypoints
1 parent 9de0c0e commit dcd56b3

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@ name: ci
55
on: [ push, pull_request ]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/setup-python@v4
12-
with:
13-
python-version: 3.9
148
os_build:
159
runs-on: ${{ matrix.os }}
1610
strategy:
1711
matrix:
1812
os: [ ubuntu-latest, macos-latest ]
19-
python: [ 3.8, 3.9 ]
13+
python: [ "3.8", "3.9", "3.10", "3.11"]
2014
node: [ 20 ]
2115
env:
2216
SAM_CLI_TELEMETRY: "0"

python/rpdk/typescript/codegen.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,15 @@ def _copy_resource(path, resource_name=None):
166166
"Runtime": project.runtime,
167167
"CodeUri": self.CODE_URI,
168168
}
169+
test_handler_params = {
170+
**handler_params,
171+
"Handler": project.test_entrypoint,
172+
}
169173
_render_template(
170174
project.root / "template.yml",
171175
resource_type=project.type_name,
172-
params=handler_params,
176+
handler_params=handler_params,
177+
test_handler_params=test_handler_params,
173178
)
174179

175180
LOG.debug("Init complete")

python/rpdk/typescript/data/create.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"secretAccessKey": "",
55
"sessionToken": ""
66
},
7+
"callerCredentials": {
8+
"accessKeyId": "",
9+
"secretAccessKey": "",
10+
"sessionToken": ""
11+
},
712
"action": "CREATE",
813
"request": {
914
"clientRequestToken": "4b90a7e4-b790-456b-a937-0cfdfa211dfe",

python/rpdk/typescript/templates/template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ Resources:
1111
TestEntrypoint:
1212
Type: AWS::Serverless::Function
1313
Properties:
14-
{% for key, value in params.items() %}
14+
{% for key, value in test_handler_params.items() %}
1515
{{ key }}: {{ value }}
1616
{% endfor %}
1717

1818
TypeFunction:
1919
Type: AWS::Serverless::Function
2020
Properties:
21-
{% for key, value in params.items() %}
21+
{% for key, value in handler_params.items() %}
2222
{{ key }}: {{ value }}
2323
{% endfor %}
2424
Metadata:

0 commit comments

Comments
 (0)