From da119b59ec954399702b96e5d7b45d41008eb19c Mon Sep 17 00:00:00 2001 From: Jim Zhang Date: Fri, 3 Mar 2017 08:21:42 -0500 Subject: [PATCH] Revert accidental changes to original end-to-end FAB-2619 some changes went in by accident that got the original test/integration/end-to-end.js to target the new "mychannel" with new msp ids. it should have been kept on the default config and left the new config to the new test/integration/e2e.js Change-Id: Id18fd119f5e39a790c86868fdee0474cb2b19580 Signed-off-by: Jim Zhang --- test/integration/end-to-end.js | 16 +++++++--------- test/unit/util.js | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/test/integration/end-to-end.js b/test/integration/end-to-end.js index eb8cc7fa12..4c7542ab73 100644 --- a/test/integration/end-to-end.js +++ b/test/integration/end-to-end.js @@ -41,7 +41,7 @@ var EventHub = require('fabric-client/lib/EventHub.js'); var chaincode_id = 'end2end'; var chaincode_version = 'v0'; -var chain_id = 'mychannel'; +var chain_id = 'testchainid'; var client = new hfc(); var chain = client.newChain(chain_id); @@ -49,8 +49,8 @@ var chain = client.newChain(chain_id); var tx_id = null; var nonce = null; var the_user = null; -var peer0 = new Peer('grpc://localhost:8051'), - peer1 = new Peer('grpc://localhost:8056'); +var peer0 = new Peer('grpc://localhost:7051'), + peer1 = new Peer('grpc://localhost:7056'); var steps = []; if (process.argv.length > 2) { @@ -73,19 +73,19 @@ chain.addPeer(peer1); test('End-to-end flow of chaincode install, instantiate, transaction invocation, and query', (t) => { hfc.newDefaultKeyValueStore({ - path: testUtil.storePathForOrg('org2') + path: testUtil.KVS }).then((store) => { client.setStateStore(store); - var promise = testUtil.getSubmitter(client, t, 'org2'); + var promise = testUtil.getSubmitter(client, t); // setup event hub for peer0 to get notified when transactions are committed var eh1 = new EventHub(); - eh1.setPeerAddr('grpc://localhost:8053'); + eh1.setPeerAddr('grpc://localhost:7053'); eh1.connect(); // setup event hub or peer1 to get notified when transactions are committed var eh2 = new EventHub(); - eh2.setPeerAddr('grpc://localhost:8058'); + eh2.setPeerAddr('grpc://localhost:7058'); eh2.connect(); // override t.end function so it'll always disconnect the event hub @@ -110,8 +110,6 @@ test('End-to-end flow of chaincode install, instantiate, transaction invocation, t.pass('Successfully enrolled user \'admin\''); the_user = admin; - the_user.mspImpl._id = 'Org2MSP'; - nonce = utils.getNonce(); tx_id = chain.buildTransactionID(nonce, the_user); diff --git a/test/unit/util.js b/test/unit/util.js index f3f63e7860..f888c66c9d 100644 --- a/test/unit/util.js +++ b/test/unit/util.js @@ -185,7 +185,7 @@ module.exports.getSubmitter = function(client, test, loadFromConfig, org) { if (typeof org === 'string') { userOrg = org; } else { - userOrg = 'peerOrg1'; + userOrg = 'org1'; } }