Commit graph

4 commits

Author SHA1 Message Date
Sijo Cherian
c1424748b0
Asset transfer private-data go-chaincode - Add unit tests (#290)
* Adding golang application for asset-transfer-basic sample. (#211)

Signed-off-by: Chongxin Luo <Chongxin.Luo@ibm.com>

Improved private data Go Chaincode in idiomatic go.

Adding go chaincode unit tests

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* Added unit tests for query-asset chaincode functions

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* Improved README

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* Added unit tests for query-asset chaincode functions

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* Fixed json.Marsal usage per review comments, Improved DeleteAsset validation

Added owner collection check for DeleteAsset chaincode
JS app now demos a new expected error on DeleteAsset by a non-owner org

Signed-off-by: Sijo Cherian <sijo@ibm.com>

Co-authored-by: Dereck <Chongxin.Luo@ibm.com>
Co-authored-by: Sijo Cherian <sijo@ibm.com>
2020-08-25 10:04:03 -04:00
David Enyeart
b3bc39ae5f Re-enable CI tests for asset-transfer-private-data JS app
Re-enable CI tests for asset-transfer-private-data JavaScript application.

Also re-add the error when private asset details are not found in the collection,
so that the CLI instructions work as desired, and to demonstrate error
handing in the client application.

Signed-off-by: David Enyeart <enyeart@us.ibm.com>
2020-08-20 16:05:42 -04:00
Sijo Cherian
36a2d3a7d0
Switched private data JS app to commons util (#294)
* Switched private data JS app to commons util

Reusing JS app & ca utils
Refactored for Org1 & Org2
assettransfer-basic JS app update for commons util refactor

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* fixed assettransfer-ledgerqueries & private usage of commons util refactor

Signed-off-by: Sijo Cherian <sijo@ibm.com>

Co-authored-by: Sijo Cherian <sijo@ibm.com>
2020-08-13 08:22:05 -04:00
Sijo Cherian
e90554f4f8
JS App workflow for private-data asset transfer, Chaincode fixes (#252)
* Adding JS App workflow, Bugfixes in Go Chaincode

Initial impl JS App workflow, Added 2 asset sample, with transfer & delete
Bugfixes: Bug fix in ReadTransferAgreement
Improved logging in Go Chaincode, Improved Chaincode error handling, checks for execution on orgs peer, bug fix, lint issues
use addDiscoveryInterest to scope policy, instead of setEndorsingOrganizations

Signed-off-by: Sijo Cherian <sijo@ibm.com>

* added js app to CI pipeline , and linting matrix

Signed-off-by: Sijo Cherian <sijo@ibm.com>

Co-authored-by: Sijo Cherian <sijo@ibm.com>
2020-08-06 14:23:11 -04:00