Merge pull request #2817 from bblommers/dynamodb_add_index_status

DynamoDB - Add status to Global Indexes
This commit is contained in:
Steve Pulec 2020-03-19 19:37:49 -05:00 committed by GitHub
commit 78f5541953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -682,6 +682,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",
}
]
)