This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Description
I'm trying to instantiate my chain code using a remote peer as follows:
`const MyChaincode = require('./index.js');
const ChaincodeMockStub = require("@theledger/fabric-mock-stub").ChaincodeMockStub;
const chaincode = new MyChaincode();
describe('Test MyChaincode', () => {
it("Should init without issues", async () => {
const mockStub = new ChaincodeMockStub("MyMockStub", chaincode);
const response = await mockStub.mockInit("tx1", []);
expect(response.status).to.eql(200)
});
});`
and the invotacion from command line is :
node mock.js --peer.address grpcs://remotepeer.mydomain.com:7100
and got the error 👍
2019-10-07T03:01:40.653Z error [shim:_] uncaughtException: PEM encoded certificate is required. Error: PEM encoded certificate is required. at new Endpoint (/home/oscar/projects/oracle/trainlabcore/blockchain/chaincode-js/node_modules/fabric-shim/lib/handler.js:796:23) at new ChaincodeSupportClient (/home/oscar/projects/oracle/trainlabcore/blockchain/chaincode-js/node_modules/fabric-shim/lib/handler.js:254:26) at Function.start (/home/oscar/projects/oracle/trainlabcore/blockchain/chaincode-js/node_modules/fabric-shim/lib/chaincode.js:141:24) at Object.<anonymous> (/home/oscar/projects/oracle/trainlabcore/blockchain/chaincode-js/index.js:48:6) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3) at Module.require (module.js:597:17)
I didn't found a way to set the PEM file to the mock.