docker-compose-files/hyperledger_fabric/v2.3.3/chaincodes/go/cc02_mockTest
Baohua Yang a813ce6e82 Add HLF v2.3.3 2021-09-09 21:54:54 -07:00
..
README.md Add HLF v2.3.3 2021-09-09 21:54:54 -07:00
cc_test.go Add HLF v2.3.3 2021-09-09 21:54:54 -07:00
chaincode_example02.go Add HLF v2.3.3 2021-09-09 21:54:54 -07:00

README.md

Debug Chaincode with MockShim

Baohua Yang, 2019-01-17

The package will demonstrate how to debug the chaincode with the MockShim lib.

This way is more efficient and quick to debug locally without any fabric network setup.

Usage

Unzip the package and enter the package path, then run

# Regular testing should return OK
$ go test .

# Debug with more logs output
$ go test -v .

Files

  • chaincode_example02.go: example02 chaincode from HLF repo;
  • cc_test.go: test code to verify the example02 chaincode logic.