Skip to content

Commit 809e209

Browse files
committed
Add conformance test coverage
1 parent 9423f87 commit 809e209

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/conformance.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: npm install
3535

3636
- name: Install conformance client
37-
uses: GoogleCloudPlatform/functions-framework-conformance/.github/actions/client/install@1975792fb34ebbfa058d690666186d669d3a5977 # v1.8.0
37+
uses: GoogleCloudPlatform/functions-framework-conformance/.github/actions/client/install@1975792fb34ebbfa058d690666186d669d3a5977 # v1.8.2
3838
with:
3939
client-version: v1.7.0
4040
cache-path: ~/client
@@ -73,6 +73,16 @@ jobs:
7373
-validate-mapping=false \
7474
-cmd="npm start -- --target=writeHttpDeclarative"
7575
76+
- name: Run Typed conformance tests using declarative API
77+
working-directory: 'test/conformance'
78+
run: |
79+
~/client \
80+
-type=http \
81+
-declarative-type=typed \
82+
-buildpacks=false \
83+
-validate-mapping=false \
84+
-cmd="npm start -- --target=writeTypedDeclarative"
85+
7686
- name: Run cloudevent conformance tests using declarative API
7787
working-directory: 'test/conformance'
7888
run: |

test/conformance/function.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ functions.http('writeHttpDeclarative', (req, res) => {
88
res.sendStatus(200);
99
});
1010

11+
functions.typed('writeTypedDeclarative', req => {
12+
payload: req;
13+
});
14+
1115
functions.cloudEvent('writeCloudEventDeclarative', cloudEvent => {
1216
cloudEvent.datacontenttype = 'application/json';
1317
writeJson(cloudEvent);

0 commit comments

Comments
 (0)