Please write a document describing how to test a chaincode in golang #167
Replies: 1 comment 2 replies
-
When they are invoked, transaction functions are passed a contractapi.TransactionContextInterface. For unit testing, you can provide your own TransactionContextInterface implementation: the provided contractapi.TransactionContext struct (which has setters to populate its state), one written by hand, or one generated using any mocking framework of your choice. Transaction functions interact with the ledger using a shim.ChaincodeStubInterface, which they obtain from the transaction context's |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In
fabric-samples
,chaincode-go
is tested usingcounterfeiter
. Doesfabric-contract-api-go
usemockery
? Testing a chaincode is very important, but I cannot find any material describing this topic. Please share a document about it. Thanks.Beta Was this translation helpful? Give feedback.
All reactions