-
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.
Fix linting issues Format file Format file
- Loading branch information
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
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
11 changes: 11 additions & 0 deletions
11
integration/combination/test_function_with_intrinsics_resource_attributes.py
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,11 @@ | ||
from integration.helpers.base_test import BaseTest | ||
|
||
|
||
class TestFunctionWithIntrinsicsResourceAttributes(BaseTest): | ||
def test_function_with_intrinsics_resource_attributes(self): | ||
# simply verify the stack is deployed successfully is enough | ||
self.create_and_verify_stack("combination/function_with_intrinsics_resource_attribute") | ||
|
||
stack_outputs = self.get_stack_outputs() | ||
id_dev_stack = stack_outputs["IsDevStack"] | ||
self.assertEqual(id_dev_stack, "true") |
10 changes: 10 additions & 0 deletions
10
integration/resources/expected/combination/function_with_intrinsics_resource_attribute.json
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,10 @@ | ||
[ | ||
{ | ||
"LogicalResourceId": "MyLambdaFunction", | ||
"ResourceType": "AWS::Lambda::Function" | ||
}, | ||
{ | ||
"LogicalResourceId": "MyLambdaFunctionRole", | ||
"ResourceType": "AWS::IAM::Role" | ||
} | ||
] |
27 changes: 27 additions & 0 deletions
27
integration/resources/templates/combination/function_with_intrinsics_resource_attribute.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,27 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: A template to test timeout support for implicit APIs. | ||
|
||
Parameters: | ||
IsDevStack: {Type: String, Default: 'true', AllowedValues: ['true', 'false']} | ||
Conditions: | ||
IsDevStack: !Equals [!Ref IsDevStack, 'true'] | ||
NotIsDevStack: !Not [Condition: IsDevStack] | ||
|
||
Resources: | ||
MyLambdaFunction: | ||
DeletionPolicy: !If [NotIsDevStack, Retain, Delete] | ||
Type: AWS::Serverless::Function | ||
Properties: | ||
Handler: index.handler | ||
Runtime: nodejs16.x | ||
MemorySize: 128 | ||
Timeout: 3 | ||
InlineCode: | | ||
exports.handler = async () => 'Hello World!' | ||
Outputs: | ||
IsDevStack: | ||
Value: !Ref IsDevStack | ||
|
||
Metadata: | ||
SamTransformTest: true |