Closed lakshyakumar closed 3 years ago
Dependent on #1147
For fabric 2.2, the node sdk is changed, as per the documentation This folder needs to be looked into https://github.com/hyperledger-labs/blockchain-automation-framework/tree/develop/examples/supplychain-app/fabric/chaincode_rest_server/rest-server/src
The postman api calls are working fine for fabric version 2.2, Able to create the container using the createContainer
API.
The API's after the creation of the container are failing in the test suite because of wrong OU. The rest of the API calls will be fixed by the issue #1191
Describe the bug The postman collection suite is not working for fabric version 2.2, the same chaincode function from the peer cli as
peer chaincode invoke -o ${ORDERER_URL} --tls --cafile ${ORDERER_CA} -C ${CHANNEL_NAME} -n supplychain --peerAddresses <peer0-cl-Address> --peerAddresses <peer0-ml-Address> --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/crypto/endorsers/cl/msp/cacerts/ca.crt --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/crypto/endorsers/ml/msp/cacerts/ca.crt -c '{"function":"createContainer","Args":["{\"misc\":{\"name\":\"Medicine Container\"},\"trackingID\":\"613254c0-5395-4069-971b-fff77dc9c73d\",\"counterparties\":[\"CN=Admin@org2.example.com,OU=client+OU=org2,O=Org2,L=San Francisco,C=US\"]}"]}'
is working. We found out that the syntax of the invokation is different from the non-lifecycle enabled chaincode. Investigate and fix the sameTo Reproduce Steps to reproduce the behavior:
Expected behavior The postman api collection suite should work.
Screenshots![image](https://user-images.githubusercontent.com/56861637/98355092-b10b3280-2047-11eb-8f65-9ddafafffef6.png)