Skip to content

Commit c7322fb

Browse files
authored
test: New test group to test for side effects (#2046)
* test: New test group to test for side effects * refactor: Updated to use _compare_transform and test CN and GOV partitions
1 parent be9b9d9 commit c7322fb

9 files changed

+1788
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Globals:
2+
Api:
3+
Auth:
4+
ApiKeyRequired: true
5+
UsagePlan:
6+
CreateUsagePlan: SHARED
7+
8+
Resources:
9+
MyApiOne:
10+
Type: AWS::Serverless::Api
11+
Properties:
12+
StageName: Prod
13+
14+
MyApiTwo:
15+
Type: AWS::Serverless::Api
16+
Properties:
17+
StageName: Prod
18+
19+
MyFunctionOne:
20+
Type: AWS::Serverless::Function
21+
Properties:
22+
Handler: index.handler
23+
Runtime: nodejs12.x
24+
InlineCode: |
25+
exports.handler = async (event) => {
26+
return {
27+
statusCode: 200,
28+
body: JSON.stringify(event),
29+
headers: {}
30+
}
31+
}
32+
Events:
33+
ApiKey:
34+
Type: Api
35+
Properties:
36+
RestApiId:
37+
Ref: MyApiOne
38+
Method: get
39+
Path: /path/one
40+
41+
MyFunctionTwo:
42+
Type: AWS::Serverless::Function
43+
Properties:
44+
Handler: index.handler
45+
Runtime: nodejs12.x
46+
InlineCode: |
47+
exports.handler = async (event) => {
48+
return {
49+
statusCode: 200,
50+
body: JSON.stringify(event),
51+
headers: {}
52+
}
53+
}
54+
Events:
55+
ApiKey:
56+
Type: Api
57+
Properties:
58+
RestApiId:
59+
Ref: MyApiTwo
60+
Method: get
61+
Path: /path/two
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Globals:
2+
Api:
3+
Auth:
4+
ApiKeyRequired: true
5+
UsagePlan:
6+
CreateUsagePlan: SHARED
7+
8+
Resources:
9+
MyApiFour:
10+
Type: AWS::Serverless::Api
11+
Properties:
12+
StageName: Prod
13+
14+
MyFunctionFour:
15+
Type: AWS::Serverless::Function
16+
Properties:
17+
Handler: index.handler
18+
Runtime: nodejs12.x
19+
InlineCode: |
20+
exports.handler = async (event) => {
21+
return {
22+
statusCode: 200,
23+
body: JSON.stringify(event),
24+
headers: {}
25+
}
26+
}
27+
Events:
28+
ApiKey:
29+
Type: Api
30+
Properties:
31+
RestApiId:
32+
Ref: MyApiFour
33+
Method: get
34+
Path: /path/four

0 commit comments

Comments
 (0)