in jetbrains-core/tst/software/aws/toolkits/jetbrains/services/cloudformation/CloudFormationTemplateIndexTest.kt [283:324]
fun listResourcesByType_simpleTable() {
val fixture = projectRule.fixture
fixture.openFile(
"template.yaml",
"""
Resources:
ServerlessFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: baz
Handler: foo
Runtime: bar
Environment:
Variables:
TABLE_NAME: my-table
DynamodbTable:
Type: AWS::Serverless::SimpleTable
Properties:
TableName: my-table
PrimaryKey:
Name: id
Type: String
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5
Tags:
Department: Engineering
AppType: Serverless
SSESpecification:
SSEEnabled: true
"""
)
runInEdtAndWait {
val resources = CloudFormationTemplateIndex.listResourcesByType(projectRule.project, "AWS::Serverless::SimpleTable")
assertThat(resources).hasSize(1)
val resource = resources.toList()[0]
assertThat(resource.indexedProperties).isEmpty()
}
}