Please follow these steps Fabric Setup
The included Fabric unit test depends on the FabCar official example, so in order to run it ensure the following:
-
follow the steps of running the first Fabric tutorial at: https://hyperledger-fabric.readthedocs.io/en/release-1.4/write_first_app.html (use the javascript smart contract) .
-
execute the enrollAdmin.js and the registerUser.js node programs.
-
alter the local hosts file by adding the following entries:
- 127.0.0.1 orderer.example.com
- 127.0.0.1 peer0.org1.example.com
- 127.0.0.1 peer0.org2.example.com
- 127.0.0.1 peer1.org1.example.com
- 127.0.0.1 peer1.org2.example.com
This ensures that the SDK is able to find the orderer and network peers.