-
Notifications
You must be signed in to change notification settings - Fork 51
It there any way to use Stub.GetQueryResult? #48
Comments
Yes, it's because of MockStub: https://github.com/hyperledger/fabric/blob/release-1.4/core/chaincode/shim/mockstub.go#L290 |
@vadiminshakov Thanks! I'll use a real network then for such tests. |
Hi, After having noticed the limitations of the mock which is in the Fabric source code, I came across CCKit which offers a mock with more possibilities and especially an advanced testing approach with Ginkgo and Gomega. But I notice that an essential operation like the simulation of CouchDB requests is not supported. Do you plan to add this feature? How else do you test the operations of your chaincodes that execute CouchDB queries? For information, this other implementation of the chaincode stub in TypesScript provides support for testing CouchDB requests: https://github.com/wearetheledger/fabric-mock-stub. |
Hi, at the moment we don't have plans to add a simulation of CouchDB requests, cause we mostly use encrypted protobuf marshaling to bytes and rich queries can't work with encrypted data. But you can try to do it for the case of JSON data modeling and add pull requests. |
Hi, |
I want to read data as a sorted list. I added CouchDB query:
But the test by mock tells me `failed to GetQueryResult: not implemented.
Is it so because I run the test with mock?
The text was updated successfully, but these errors were encountered: