Skip to content

Commit

Permalink
node-SDK: add unit tests for chaincode events
Browse files Browse the repository at this point in the history
This patch adds a series of chaincode event unit tests
and addresses FAB-391

Change-Id: I7b77bbbfe8d4c12146cd4cc0e306eafe4491be58
Signed-off-by: Patrick Mullaney <pm.mullaney@gmail.com>
  • Loading branch information
pmullaney committed Sep 27, 2016
1 parent cc31c23 commit c974285
Show file tree
Hide file tree
Showing 2 changed files with 529 additions and 0 deletions.
13 changes: 13 additions & 0 deletions sdk/node/bin/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ runTests() {
runAssetMgmtTests
runAssetMgmtWithRolesTests
runAssetMgmtWithDynamicRolesTests
runEventTests
echo "End running tests in network mode"
}

Expand Down Expand Up @@ -227,6 +228,18 @@ runAssetMgmtWithDynamicRolesTests() {
echo "END running asset management with dynamic roles tests"
}

runEventTests() {
echo "BEGIN running event-tests ..."
preExample eventsender mycc5
node $UNITTEST/event-tests.js
if [ $? -ne 0 ]; then
echo "ERROR running event-tests!"
NODE_ERR_CODE=1
fi
postExample eventsender
echo "END running event-tests"
}

# start process
# $1 is executable path with any args
# $2 is the log file
Expand Down
Loading

0 comments on commit c974285

Please sign in to comment.