Skip to content

Commit

Permalink
Make tests on ProvisionedThroughput more lenient; newer DynamoDB can …
Browse files Browse the repository at this point in the history
…return more information
  • Loading branch information
cdhowie committed Apr 22, 2018
1 parent 44440f4 commit 29f3470
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/integration/create-table-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('Create Tables Integration Tests', function () {
expect(nickIndex.KeySchema).to.eql([
{ AttributeName: 'nick', KeyType: 'HASH' },
]);
expect(nickIndex.ProvisionedThroughput).to.eql({ ReadCapacityUnits: 1, WriteCapacityUnits: 1 });
expect(nickIndex.ProvisionedThroughput).to.include({ ReadCapacityUnits: 1, WriteCapacityUnits: 1 });

return Model.deleteTable(done);
});
Expand Down Expand Up @@ -271,7 +271,7 @@ describe('Create Tables Integration Tests', function () {
expect(nickIndex.KeySchema).to.eql([
{ AttributeName: 'nick', KeyType: 'HASH' },
]);
expect(nickIndex.ProvisionedThroughput).to.eql({ ReadCapacityUnits: 10, WriteCapacityUnits: 5 });
expect(nickIndex.ProvisionedThroughput).to.include({ ReadCapacityUnits: 10, WriteCapacityUnits: 5 });

return Model.deleteTable(done);
});
Expand Down Expand Up @@ -323,7 +323,7 @@ describe('Create Tables Integration Tests', function () {
expect(nickIndex.KeySchema).to.eql([
{ AttributeName: 'nick', KeyType: 'HASH' },
]);
expect(nickIndex.ProvisionedThroughput).to.eql({ ReadCapacityUnits: 1, WriteCapacityUnits: 1 });
expect(nickIndex.ProvisionedThroughput).to.include({ ReadCapacityUnits: 1, WriteCapacityUnits: 1 });

const ageWinsIndex = _.find(desc.GlobalSecondaryIndexes, { IndexName: 'GlobalAgeWinsIndex' });
expect(ageWinsIndex.IndexName).to.eql('GlobalAgeWinsIndex');
Expand All @@ -332,7 +332,7 @@ describe('Create Tables Integration Tests', function () {
{ AttributeName: 'age', KeyType: 'HASH' },
{ AttributeName: 'wins', KeyType: 'RANGE' },
]);
expect(ageWinsIndex.ProvisionedThroughput).to.eql({ ReadCapacityUnits: 1, WriteCapacityUnits: 1 });
expect(ageWinsIndex.ProvisionedThroughput).to.include({ ReadCapacityUnits: 1, WriteCapacityUnits: 1 });

expect(desc.LocalSecondaryIndexes).to.have.length(2);

Expand Down

0 comments on commit 29f3470

Please sign in to comment.