-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
9 changed files
with
1,788 additions
and
0 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
tests/translator/input/api_with_usageplans_shared_no_side_effect_1.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Globals: | ||
Api: | ||
Auth: | ||
ApiKeyRequired: true | ||
UsagePlan: | ||
CreateUsagePlan: SHARED | ||
|
||
Resources: | ||
MyApiOne: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
|
||
MyApiTwo: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
|
||
MyFunctionOne: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
InlineCode: | | ||
exports.handler = async (event) => { | ||
return { | ||
statusCode: 200, | ||
body: JSON.stringify(event), | ||
headers: {} | ||
} | ||
} | ||
Events: | ||
ApiKey: | ||
Type: Api | ||
Properties: | ||
RestApiId: | ||
Ref: MyApiOne | ||
Method: get | ||
Path: /path/one | ||
|
||
MyFunctionTwo: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
InlineCode: | | ||
exports.handler = async (event) => { | ||
return { | ||
statusCode: 200, | ||
body: JSON.stringify(event), | ||
headers: {} | ||
} | ||
} | ||
Events: | ||
ApiKey: | ||
Type: Api | ||
Properties: | ||
RestApiId: | ||
Ref: MyApiTwo | ||
Method: get | ||
Path: /path/two |
34 changes: 34 additions & 0 deletions
34
tests/translator/input/api_with_usageplans_shared_no_side_effect_2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Globals: | ||
Api: | ||
Auth: | ||
ApiKeyRequired: true | ||
UsagePlan: | ||
CreateUsagePlan: SHARED | ||
|
||
Resources: | ||
MyApiFour: | ||
Type: AWS::Serverless::Api | ||
Properties: | ||
StageName: Prod | ||
|
||
MyFunctionFour: | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs12.x | ||
InlineCode: | | ||
exports.handler = async (event) => { | ||
return { | ||
statusCode: 200, | ||
body: JSON.stringify(event), | ||
headers: {} | ||
} | ||
} | ||
Events: | ||
ApiKey: | ||
Type: Api | ||
Properties: | ||
RestApiId: | ||
Ref: MyApiFour | ||
Method: get | ||
Path: /path/four |
Oops, something went wrong.