This repository has been archived by the owner on Mar 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix Issue #809 - Add Error Logging for Development Chaincode #2190
Merged
srderson
merged 6 commits into
hyperledger-archives:master
from
juliancarrivick-ibm:issue-809
Jul 26, 2016
Merged
Fix Issue #809 - Add Error Logging for Development Chaincode #2190
srderson
merged 6 commits into
hyperledger-archives:master
from
juliancarrivick-ibm:issue-809
Jul 26, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add Error message when a user attempts an action other than deploy when they are running their own chaincode and in Developer Mode
Hi juliancarrivick-ibm, Thanks for submitting this pull request! I can confirm that the DCO1.1 sign-off has been included. It is okay to process this pull request. dco-bot |
Is it possible to write a bdd test for this? It would be cool. E.g. searching the peer output for an error message like this when one has no chain code deployed. |
@gabre I'll give it a shot :) |
I'm not going to finish this today (I've had to learn all about the wonderful world of Behaviour Driven Tests). I'm also away until next Tuesday. I'll push what I've done so far (written the tests, need to implement the logic) and hopefully finish it on Tuesday. |
juliancarrivick-ibm
changed the title
Fix Issue #809 - Add Error Logging for Development Chaincode
[WIP] Fix Issue #809 - Add Error Logging for Development Chaincode
Jul 19, 2016
…r final 2 tests Implemented deploy chaincode by name in BDD step Move other deploy steps to use refactored deploy code Refactored test util to be able to return full container name from peer name Log checking implemented, need to tweak logic to make tests pass Ensure first 2 logging tests pass
juliancarrivick-ibm
force-pushed
the
issue-809
branch
16 times, most recently
from
July 21, 2016 02:40
31ddeb3
to
2fa55a8
Compare
juliancarrivick-ibm
force-pushed
the
issue-809
branch
from
July 21, 2016 03:10
2fa55a8
to
d8fafa4
Compare
juliancarrivick-ibm
changed the title
[WIP] Fix Issue #809 - Add Error Logging for Development Chaincode
Fix Issue #809 - Add Error Logging for Development Chaincode
Jul 21, 2016
Ready to be looked at, please note also incorporates changes from #2267 so that new tests will run. |
LGTM, thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add Error message when a user attempts an action other than deploy when they are running their own chaincode and in Developer Mode
Motivation and Context
Fixes #809
The existing log messages were misleading for developers when they forgot to deploy chaincode before invoking or querying. This will flag that situation in the logs.
How Has This Been Tested?
I have manually verified that an error message is generated when invoke is called on Chaincode that has not been deployed yet:
Unit testing this change looks overwhelming given the size of the function this is in and the lack of a mocking framework (not to mention the lack of any tests for this file at all). I am willing to try and get something in place if it is essential, otherwise I suggest testing this file should be done in another pull request.
Checklist:
Signed-off-by: Julian Carrivick [email protected]