Skip to content

Commit c974285

Browse files
committed
node-SDK: add unit tests for chaincode events
This patch adds a series of chaincode event unit tests and addresses FAB-391 Change-Id: I7b77bbbfe8d4c12146cd4cc0e306eafe4491be58 Signed-off-by: Patrick Mullaney <[email protected]>
1 parent cc31c23 commit c974285

File tree

2 files changed

+529
-0
lines changed

2 files changed

+529
-0
lines changed

sdk/node/bin/run-unit-tests.sh

+13
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ runTests() {
8282
runAssetMgmtTests
8383
runAssetMgmtWithRolesTests
8484
runAssetMgmtWithDynamicRolesTests
85+
runEventTests
8586
echo "End running tests in network mode"
8687
}
8788

@@ -227,6 +228,18 @@ runAssetMgmtWithDynamicRolesTests() {
227228
echo "END running asset management with dynamic roles tests"
228229
}
229230

231+
runEventTests() {
232+
echo "BEGIN running event-tests ..."
233+
preExample eventsender mycc5
234+
node $UNITTEST/event-tests.js
235+
if [ $? -ne 0 ]; then
236+
echo "ERROR running event-tests!"
237+
NODE_ERR_CODE=1
238+
fi
239+
postExample eventsender
240+
echo "END running event-tests"
241+
}
242+
230243
# start process
231244
# $1 is executable path with any args
232245
# $2 is the log file

0 commit comments

Comments
 (0)