Skip to content

Commit

Permalink
[FABN-1379] Fix dodgy E2E chaincode example_cc1
Browse files Browse the repository at this point in the history
10:34:31  not ok 238 Error: Failed to test for bad
transient map. The chaincode should have rejected
the upgrade proposal.

This error is coming from a test that checks to see
if we get an upgrade failure when we send in bad transient
data.

Putting the stupid test aside, this E2E test uses a
Node.js chaincode that accesses an undocumented "map"
property of the transient map, which is no longer
present since the Node.js chaincode got upgraded to
protobufjs v6.

Fix the chaincode, but come back and kill the tests
soon.

Signed-off-by: Simon Stone <[email protected]>
Change-Id: I19e1b4b045fb75da339a9cf092604590d7542f06
  • Loading branch information
Simon Stone authored and harrisob committed Sep 20, 2019
1 parent 13e8a8e commit a2f1d7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/fixtures/chaincode/node_cc/example_cc1/chaincode.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ const Chaincode = class {
return shim.error(Buffer.from('{"Error":"Did not find expected transient map in the proposal}'));
}

const v = tm.map.test;
const v = tm.get('test');

if (!v) {
logger.error('Did not find expected key "test" in the transient map of the proposal');
Expand Down

0 comments on commit a2f1d7f

Please sign in to comment.