DynamoDB
Seed DynamoDB tables and check the items your services write.
The steps use the scenario’s AWS account (the {word} aws account with the following properties:, from aws-core).
A seed is a YAML or JSON file that maps table names to the items to put, written as plain JSON (numbers become N, objects M, arrays L):
insured-parcels: - reference: PX-CLM-1001 declaredValue: 120 carrier: KESTRELChecks wait (10 seconds unless within {duration} says otherwise) until the table has an item, or a number of items, meeting every condition: attribute | value rows with a dotted path into maps (address.city), compared as text, null for null and undefined for absent. Items are read with a scan, which suits the small tables of a test environment.
aws-dynamodb.seed
Section titled “aws-dynamodb.seed”Given a {filepath} dynamodb seedPut the items of a seed file (resolved against resources): YAML or JSON mapping table names to lists of items.
Parameters: {filepath} (A file of the project, without whitespace: a path relative to the resources directories or to the directory of axx.yaml, or an absolute path. Editors link it to the file)
Example:
Given a seeds/insured-parcels.yaml dynamodb seedSince 0.1.0.
aws-dynamodb.item
Section titled “aws-dynamodb.item”Then [[within {duration} ]]the {word} dynamodb table has an item where: | ... | ... |Wait (10s, or the given time) until the table has an item meeting every attribute | value row.
Variants (optional parts in [[...]] above):
the {word} dynamodb table has an item where:within {duration} the {word} dynamodb table has an item where:
Parameters: {duration} (A duration in seconds or minutes, e.g. 5s or 2m), {word} (one word, no spaces)
Example:
Then within 30s the claims dynamodb table has an item where:Since 0.1.0.
aws-dynamodb.items
Section titled “aws-dynamodb.items”Then [[within {duration} ]]the {word} dynamodb table has {int} item(s) where: | ... | ... |Wait (10s, or the given time) until exactly that many items of the table meet every attribute | value row.
Variants (optional parts in [[...]] above):
the {word} dynamodb table has {int} item(s) where:within {duration} the {word} dynamodb table has {int} item(s) where:
Parameters: {duration} (A duration in seconds or minutes, e.g. 5s or 2m), {word} (one word, no spaces), {int} (a 32-bit integer)
Example:
Then the claims dynamodb table has 1 item where:Since 0.1.0.