Skip to content

Commit

Permalink
[FAB-16473] Test updates to reflect FAB-16303
Browse files Browse the repository at this point in the history
FAB-16303 changed the historydb results to be
newest to oldest. Currently the Node.js chaincode
tests expect it to be oldest to newest, so this
CR updates the tests.

Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
Change-Id: If6334cc90b0dc9e35d637ee70f298812f463d0ec
  • Loading branch information
Simon Stone committed Sep 2, 2019
1 parent e71eedd commit 65f021a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/fv/crud.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ describe('Chaincode CRUD', () => {
await utils.invoke(suite, 'org.mynamespace.crud:putKey', ['key1', 'value1']);

let payload = await utils.query(suite, 'org.mynamespace.crud:getHistoryForKey', ['key1']);
expect(JSON.parse(payload)).to.deep.equal(['value1', 'newValue1', 'newValue2', 'newValue3', 'value1']);
expect(JSON.parse(payload)).to.deep.equal(['value1', 'newValue3', 'newValue2', 'newValue1', 'value1']);

payload = await utils.query(suite, 'org.mynamespace.crud:getHistoryForKeyUsingAsyncIterator', ['key1']);
expect(JSON.parse(payload)).to.deep.equal(['value1', 'newValue1', 'newValue2', 'newValue3', 'value1']);
expect(JSON.parse(payload)).to.deep.equal(['value1', 'newValue3', 'newValue2', 'newValue1', 'value1']);

});

Expand Down

0 comments on commit 65f021a

Please sign in to comment.