Skip to content

Commit eba4553

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: I9e9add7481a46e024628954e51f1baab83ecfdef Signed-off-by: Patrick Mullaney <[email protected]>
1 parent 4d4df36 commit eba4553

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)