#2813 - DynamoDB - Add Global Index Status

This commit is contained in:
Bert Blommers 2020-03-17 15:41:50 +00:00
parent 60c98ca836
commit b7da6b9481
2 changed files with 5 additions and 0 deletions

View File

@ -679,6 +679,10 @@ class Table(BaseModel):
self.throughput["NumberOfDecreasesToday"] = 0
self.indexes = indexes
self.global_indexes = global_indexes if global_indexes else []
for index in self.global_indexes:
index[
"IndexStatus"
] = "ACTIVE" # One of 'CREATING'|'UPDATING'|'DELETING'|'ACTIVE'
self.created_at = datetime.datetime.utcnow()
self.items = defaultdict(dict)
self.table_arn = self._generate_arn(table_name)

View File

@ -574,6 +574,7 @@ def test_create_with_global_indexes():
"ReadCapacityUnits": 6,
"WriteCapacityUnits": 1,
},
"IndexStatus": "ACTIVE",
}
]
)