{"action":"created","issue":{"url":"https://api.github.com/repos/hyperledger/fabric/issues/2220","repository_url":"https://api.github.com/repos/hyperledger/fabric","labels_url":"https://api.github.com/repos/hyperledger/fabric/issues/2220/labels{/name}","comments_url":"https://api.github.com/repos/hyperledger/fabric/issues/2220/comments","events_url":"https://api.github.com/repos/hyperledger/fabric/issues/2220/events","html_url":"https://github.com/hyperledger/fabric/pull/2220","id":165738272,"number":2220,"title":"[WIP] Issue #2119","user":{"login":"brad-gorman","id":20159918,"avatar_url":"https://avatars.githubusercontent.com/u/20159918?v=3","gravatar_id":"","url":"https://api.github.com/users/brad-gorman","html_url":"https://github.com/brad-gorman","followers_url":"https://api.github.com/users/brad-gorman/followers","following_url":"https://api.github.com/users/brad-gorman/following{/other_user}","gists_url":"https://api.github.com/users/brad-gorman/gists{/gist_id}","starred_url":"https://api.github.com/users/brad-gorman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brad-gorman/subscriptions","organizations_url":"https://api.github.com/users/brad-gorman/orgs","repos_url":"https://api.github.com/users/brad-gorman/repos","events_url":"https://api.github.com/users/brad-gorman/events{/privacy}","received_events_url":"https://api.github.com/users/brad-gorman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-07-15T08:42:09Z","updated_at":"2016-07-21T18:32:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hyperledger/fabric/pulls/2220","html_url":"https://github.com/hyperledger/fabric/pull/2220","diff_url":"https://github.com/hyperledger/fabric/pull/2220.diff","patch_url":"https://github.com/hyperledger/fabric/pull/2220.patch"},"body":"## Description\r\nThis pull request is only partially complete. I would dearly like feedback before progressing futher with this.\r\nIt provides an interface that allows chaincode developers to easily unit test their own code.\r\nImplemented functions are: Init() Invoke() Query() RangeQueryState() GetState() PutState() DelState() InvokeChaincode() QueryChaincode().\r\nUnimplemented functions: anything related to tables, certificates and security.\r\nThis pull request does away with the shim.ChaincodeStub pointers used in most chaincode and replaces them with a shim.ChaincodeStubInterface - so there will be matching changes needed on the user side as well.\r\n\r\n## Motivation and Context\r\nThe current implementation does not allow unit testing of chaincode, which will be important for complex contracts.\r\nPartially fixes #2119 \r\n\r\n## How Has This Been Tested?\r\nThere are unit tests implemented for chaincode_example02 through 05\r\n\r\n## Checklist:\r\n<!-- To check a box, and an 'x': [x] -->\r\n<!-- To uncheck box, add a space: [ ] -->\r\n<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [] I have added a [Signed-off-by](https://github.com/hyperledger/fabric/blob/master/CONTRIBUTING.md#legal-stuff).\r\n- [] I have either added documentation to cover my changes or this change requires no new documentation.\r\n- [] I have either added unit tests to cover my changes or this change requires no new tests.\r\n- [] I have run [golint](https://github.com/golang/lint) and have fixed valid warnings in code I have added or modified. This tool generates false positives so you may choose to ignore some warnings. The goal is clean, consistent, and readable code.\r\n\r\n<!-- The continuous integration build process will run [make checks](https://github.com/hyperledger/fabric/blob/master/Makefile#L22) to confirm that tests pass and that code quality meets minimum standards. You may optionally run this locally as PRs will not be accepted until they pass. -->\r\n\r\nSigned-off-by:\r\n"},"comment":{"url":"https://api.github.com/repos/hyperledger/fabric/issues/comments/234342879","html_url":"https://github.com/hyperledger/fabric/pull/2220#issuecomment-234342879","issue_url":"https://api.github.com/repos/hyperledger/fabric/issues/2220","id":234342879,"user":{"login":"christo4ferris","id":3630697,"avatar_url":"https://avatars.githubusercontent.com/u/3630697?v=3","gravatar_id":"","url":"https://api.github.com/users/christo4ferris","html_url":"https://github.com/christo4ferris","followers_url":"https://api.github.com/users/christo4ferris/followers","following_url":"https://api.github.com/users/christo4ferris/following{/other_user}","gists_url":"https://api.github.com/users/christo4ferris/gists{/gist_id}","starred_url":"https://api.github.com/users/christo4ferris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christo4ferris/subscriptions","organizations_url":"https://api.github.com/users/christo4ferris/orgs","repos_url":"https://api.github.com/users/christo4ferris/repos","events_url":"https://api.github.com/users/christo4ferris/events{/privacy}","received_events_url":"https://api.github.com/users/christo4ferris/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T18:32:40Z","updated_at":"2016-07-21T18:32:40Z","body":"@brad-gorman I think that this is the right thing to do, despite the disruption to existing chaincode. Would you please draft up release note entry that provides users with precise changes that they will need to make, suitable for publishing. Thanks.\r\n\r\n@srderson think we discussed this in slack... would you might weighing in? Thanks. @binhn @muralisrini as well. I do think it important that we get this right rather than have it difficult to test chaincode by imposing a requirement to run integration tests rather than unit tests."}}
{"actor":{"display_login":"christo4ferris"}}