2. Install Hyperledger Fabric Client SDK for Node.js

Posted . Visible to the public.
d:\Work\Fabric>npm install -g gulp
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN notice [SECURITY] lodash has the following vulnerability: 1 low. Go here for more details: https://nodesecurity.io/advisories?search=lodash&version=1.0.2 - Run `npm i npm@latest -g` to upgrade your npm version, and then `npm audit` to get more info.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
C:\Users\kiat\AppData\Roaming\npm\gulp -> C:\Users\kiat\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
+ gulp@3.9.1
added 253 packages in 15.872s
d:\Work\Fabric>npm install -g minimatch
+ minimatch@3.0.4
updated 2 packages in 0.739s
d:\Work\Fabric>npm install -g graceful-fs
+ graceful-fs@4.1.11
added 1 package in 0.512s
d:\Work\Fabric>npm install -g npm@latest
C:\Users\kiat\AppData\Roaming\npm\npx -> C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\bin\npx-cli.js
C:\Users\kiat\AppData\Roaming\npm\npm -> C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
+ npm@6.4.1
added 274 packages, removed 363 packages and updated 43 packages in 12.987s

d:\Work\Fabric>npm -- version
{ npm: '6.4.1',
  ares: '1.10.1-DEV',
  cldr: '31.0.1',
  http_parser: '2.7.0',
  icu: '59.1',
  modules: '57',
  nghttp2: '1.25.0',
  node: '8.9.1',
  openssl: '1.0.2m',
  tz: '2017b',
  unicode: '9.0',
  uv: '1.15.0',
  v8: '6.1.534.47',
  zlib: '1.2.11' }

d:\Work\Fabric>npm audit
npm ERR! code EAUDITNOPJSON
npm ERR! audit No package.json found: Cannot audit a project without a package.json

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kiat\AppData\Roaming\npm-cache\_logs\2018-10-03T06_57_58_557Z-debug.log

d:\Work\Fabric>
d:\Work\Fabric>dir
 Volume in drive D has no label.
 Volume Serial Number is B47F-F61E

 Directory of d:\Work\Fabric

03-Oct-18  03:04 PM    <DIR>          .
03-Oct-18  03:04 PM    <DIR>          ..
03-Oct-18  01:05 PM    <DIR>          fabric-samples
03-Oct-18  03:05 PM    <DIR>          fabric-sdk-node
               0 File(s)              0 bytes
               4 Dir(s)  46,772,375,552 bytes free

d:\Work\Fabric>cd fabric-sdk-node

d:\Work\Fabric\fabric-sdk-node>npm install
npm WARN deprecated formatio@1.2.0: This package is unmaintained. Use @sinonjs/formatio instead
npm WARN deprecated text-encoding@0.6.4: no longer maintained
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated wrench@1.3.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.

> dtrace-provider@0.4.0 install d:\Work\Fabric\fabric-sdk-node\node_modules\mock-couch\node_modules\dtrace-provider
> node scripts/install.js


> dtrace-provider@0.8.7 install d:\Work\Fabric\fabric-sdk-node\node_modules\dtrace-provider
> node-gyp rebuild || node suppress-error.js


d:\Work\Fabric\fabric-sdk-node\node_modules\dtrace-provider>if not defined npm_config_node_gyp (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.

> pkcs11js@1.0.16 install d:\Work\Fabric\fabric-sdk-node\node_modules\pkcs11js
> node-gyp rebuild


d:\Work\Fabric\fabric-sdk-node\node_modules\pkcs11js>if not defined npm_config_node_gyp (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  main.cpp
  dl.cpp
  const.cpp
  error.cpp
  v8_convert.cpp
  template.cpp
  mech.cpp
  param.cpp
  param_aes.cpp
  param_rsa.cpp
  param_ecdh.cpp
  pkcs11.cpp
  async.cpp
  node.cpp
  win_delay_load_hook.cc
     Creating library d:\Work\Fabric\fabric-sdk-node\node_modules\pkcs11js\build\Release\pkcs11.lib and object d:\Work\
  Fabric\fabric-sdk-node\node_modules\pkcs11js\build\Release\pkcs11.exp
  Generating code
  Finished generating code
  pkcs11.vcxproj -> d:\Work\Fabric\fabric-sdk-node\node_modules\pkcs11js\build\Release\\pkcs11.node

> grpc@1.10.1 install d:\Work\Fabric\fabric-sdk-node\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library

[grpc] Success: "d:\Work\Fabric\fabric-sdk-node\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node" is installed via remote

> heapdump@0.3.9 install d:\Work\Fabric\fabric-sdk-node\node_modules\heapdump
> node-gyp rebuild


d:\Work\Fabric\fabric-sdk-node\node_modules\heapdump>if not defined npm_config_node_gyp (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  heapdump.cc
     Creating library d:\Work\Fabric\fabric-sdk-node\node_modules\heapdump\build\Release\addon.lib and object d:\Work\F
  abric\fabric-sdk-node\node_modules\heapdump\build\Release\addon.exp
  Generating code
  Finished generating code
  addon.vcxproj -> d:\Work\Fabric\fabric-sdk-node\node_modules\heapdump\build\Release\\addon.node

> x509@0.3.3 install d:\Work\Fabric\fabric-sdk-node\node_modules\x509
> node-gyp rebuild


d:\Work\Fabric\fabric-sdk-node\node_modules\x509>if not defined npm_config_node_gyp (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  addon.cc
  x509.cc
  win_delay_load_hook.cc
d:\work\fabric\fabric-sdk-node\node_modules\x509\node_modules\nan\nan_maybe_43_inl.h(220): warning C4996: 'v8::Array::C
loneElementAt': was declared deprecated (compiling source file ..\src\addon.cc) [d:\Work\Fabric\fabric-sdk-node\node_mo
dules\x509\build\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(3501): note: see declaration of 'v8::Array::CloneElementAt' (compilin
  g source file ..\src\addon.cc)
d:\work\fabric\fabric-sdk-node\node_modules\x509\node_modules\nan\nan_implementation_12_inl.h(40): warning C4996: 'v8::
BooleanObject::New': was declared deprecated (compiling source file ..\src\addon.cc) [d:\Work\Fabric\fabric-sdk-node\no
de_modules\x509\build\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(4793): note: see declaration of 'v8::BooleanObject::New' (compiling s
  ource file ..\src\addon.cc)
d:\work\fabric\fabric-sdk-node\node_modules\x509\node_modules\nan\nan_maybe_43_inl.h(220): warning C4996: 'v8::Array::C
loneElementAt': was declared deprecated (compiling source file ..\src\x509.cc) [d:\Work\Fabric\fabric-sdk-node\node_mod
ules\x509\build\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(3501): note: see declaration of 'v8::Array::CloneElementAt' (compilin
  g source file ..\src\x509.cc)
d:\work\fabric\fabric-sdk-node\node_modules\x509\node_modules\nan\nan_implementation_12_inl.h(40): warning C4996: 'v8::
BooleanObject::New': was declared deprecated (compiling source file ..\src\x509.cc) [d:\Work\Fabric\fabric-sdk-node\nod
e_modules\x509\build\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(4793): note: see declaration of 'v8::BooleanObject::New' (compiling s
  ource file ..\src\x509.cc)
d:\work\fabric\fabric-sdk-node\node_modules\x509\node_modules\nan\nan.h(1963): warning C4996: 'v8::Object::SetAccessor'
: was declared deprecated (compiling source file ..\src\addon.cc) [d:\Work\Fabric\fabric-sdk-node\node_modules\x509\bui
ld\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(3171): note: see declaration of 'v8::Object::SetAccessor' (compiling
  source file ..\src\addon.cc)
d:\work\fabric\fabric-sdk-node\node_modules\x509\node_modules\nan\nan.h(1963): warning C4996: 'v8::Object::SetAccessor'
: was declared deprecated (compiling source file ..\src\x509.cc) [d:\Work\Fabric\fabric-sdk-node\node_modules\x509\buil
d\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(3171): note: see declaration of 'v8::Object::SetAccessor' (compiling
  source file ..\src\x509.cc)
d:\work\fabric\fabric-sdk-node\node_modules\x509\src\x509.cc(433): warning C4996: 'v8::Object::CallAsConstructor': was
declared deprecated [d:\Work\Fabric\fabric-sdk-node\node_modules\x509\build\x509.vcxproj]
  c:\users\kiat\.node-gyp\8.9.1\include\node\v8.h(3466): note: see declaration of 'v8::Object::CallAsConstructor'
LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libeay32.lib' [d:\Work\Fabric\fabric-sdk-node\
node_modules\x509\build\x509.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\kiat\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\kiat\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd d:\Work\Fabric\fabric-sdk-node\node_modules\x509
gyp ERR! node -v v8.9.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! x509@0.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the x509@0.3.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kiat\AppData\Roaming\npm-cache\_logs\2018-10-03T07_09_16_538Z-debug.log

d:\Work\Fabric\fabric-sdk-node>
d:\Work\Fabric\fabric-sdk-node>npm test

> fabric-sdk-node@1.1.3 test d:\Work\Fabric\fabric-sdk-node
> gulp test-headless


####################################################
# debug log: C:\Users\kiat\AppData\Local\Temp\hfc\test-log\debug.log
####################################################

[15:12:24] Using gulpfile d:\Work\Fabric\fabric-sdk-node\gulpfile.js
[15:12:24] Starting 'clean-up'...
[15:12:24] Finished 'clean-up' after 2.46 ms
[15:12:24] Starting 'lint'...
[15:12:24] Starting 'pre-test'...
[15:12:24] Starting 'ca'...
[15:12:25] gulp-debug: fabric-client\lib\api.js
[15:12:25] gulp-debug: fabric-client\lib\hash.js
[15:12:26] gulp-debug: fabric-client\lib\utils.js
[15:12:26] gulp-debug: fabric-client\lib\BaseClient.js
[15:12:26] gulp-debug: fabric-client\lib\Config.js
[15:12:26] gulp-debug: fabric-client\lib\Remote.js
[15:12:26] gulp-debug: fabric-client\lib\User.js
[15:12:26] gulp-debug: fabric-client\lib\impl\bccsp_pkcs11.js
[15:12:26] gulp-debug: fabric-client\lib\impl\CouchDBKeyValueStore.js
[15:12:26] gulp-debug: fabric-client\lib\impl\CryptoSuite_ECDSA_AES.js
[15:12:27] gulp-debug: fabric-client\lib\impl\aes\pkcs11_key.js
[15:12:27] gulp-debug: fabric-client\lib\impl\ecdsa\key.js
[15:12:27] gulp-debug: fabric-client\lib\impl\ecdsa\pkcs11_key.js
[15:12:27] gulp-debug: fabric-client\lib\impl\CryptoKeyStore.js
[15:12:27] gulp-debug: fabric-client\lib\impl\FileKeyValueStore.js
[15:12:27] gulp-debug: fabric-client\lib\msp\identity.js
[15:12:27] gulp-debug: fabric-client\lib\msp\msp.js
[15:12:27] gulp-debug: fabric-client\lib\protos\msp\identities.proto
[15:12:27] gulp-debug: fabric-client\lib\protos\msp\msp_config.proto
[15:12:27] gulp-debug: fabric-client\types\tsconfig.json
[15:12:27] gulp-debug: fabric-client\types\base.d.ts
[15:12:27] gulp-debug: 21 items
[15:12:27] Finished 'ca' after 3.28 s
[15:12:27] Finished 'pre-test' after 3.37 s
[15:12:29] Finished 'lint' after 4.56 s
[15:12:29] Starting 'test-headless'...

TAP version 13
# AffiliationService: Test create() function
ok 1 Must fail if missing request argument
ok 2 Must fail if missing req.name argument
ok 3 Must fail if missing registrar argument
ok 4 Must fail if registrar argument is not a User object
ok 5 Must fail if missing signingIdentity
# AffiliationService: Test getOne() function
ok 6 Must fail if missing affiliation argument
ok 7 Must fail if missing registrar argument
ok 8 Must fail if registrar argument is not a User object
ok 9 Must fail if missing signingIdentity
# AffiliationService: Test getAll() function
ok 10 Must fail if missing registrar argument
ok 11 Must fail if registrar argument is not a User object
ok 12 Must fail if missing signingIdentity
# AffiliationService: Test delete() function
ok 13 Must fail if missing request argument
ok 14 Must fail if missing or invalid req.name argument
ok 15 Must fail if missing registrar argument
ok 16 Must fail if registrar argument is not a User object
ok 17 Must fail if missing signingIdentity
# AffiliationService: Test update() function
ok 18 Must fail if missing affiliation argument
ok 19 Must fail if missing request argument
ok 20 Must fail if missing or invalid req.name argument
ok 21 Must fail if missing registrar argument
ok 22 Must fail if registrar argument is not a User object
ok 23 Must fail if missing signingIdentity
#

*** BlockDecoder test for readwrite sets
ok 24 Successfully build a results proto with read and write sets
ok 25  check results_json.ns_rwset[0].namespace
ok 26  check results_json.ns_rwset[0].rwset.reads[0].key
ok 27  check results_json.ns_rwset[0].rwset.reads[0].version.block_num
ok 28  check results_json.ns_rwset[0].rwset.reads[0].version.tx_num
ok 29  check results_json.ns_rwset[0].rwset.range_queries_info[0].start_key
ok 30  check results_json.ns_rwset[0].rwset.range_queries_info[0].end_key
ok 31  check results_json.ns_rwset[0].rwset.range_queries_info[0].itr_exhausted
ok 32  check results_json.ns_rwset[0].rwset.writes[0].key
ok 33  check results_json.ns_rwset[0].rwset.writes[0].version.is_delete
ok 34  check results_json.ns_rwset[0].rwset.writes[0].value
ok 35  check results_json.ns_rwset[0].namespace
ok 36  check results_json.ns_rwset[0].rwset.reads[0].key
ok 37  check results_json.ns_rwset[0].rwset.reads[0].version.block_num
ok 38  check results_json.ns_rwset[0].rwset.reads[0].version.tx_num
ok 39  check results_json.ns_rwset[0].rwset.reads[0].range_queries_info[0].reads_info.kv_reads[0].key
ok 40  check results_json.ns_rwset[0].rwset.reads[0].range_queries_info[0].reads_info.kv_reads[0].version.block_num
ok 41  check results_json.ns_rwset[0].rwset.reads[0].range_queries_info[0].reads_info.kv_reads[0].version.tx_num.
ok 42  check results_json.ns_rwset[0].namespace
ok 43  check results_json.ns_rwset[0].rwset.reads[0].key
ok 44  check results_json.ns_rwset[0].rwset.reads[0].version.block_num
ok 45  check results_json.ns_rwset[0].rwset.reads[0].version.tx_num
ok 46  check results_json.ns_rwset[0].rwset.range_queries_info[0].reads_merkle_hashes.max_degree
ok 47  check results_json.ns_rwset[0].rwset.range_queries_info[0].reads_merkle_hashes.max_level
ok 48  check results_json.ns_rwset[0].rwset.range_queries_info[0].reads_merkle_hashes.max_level_hashes[0]
#

*** BlockDecoder.js tests ***


ok 49 Check input is a Buffer object
ok 50 Check input exist
ok 51 Genesis block parsed without error
ok 52 Test parsing of channel's Writers policy is of IMPLICIT_META type
ok 53 Test throwing an error on unknown policy type
#

*** BlockDecoder.js test HeaderType ***


ok 54 Check HeaderType for UNKNOWN_TYPE type
ok 55 Check HeaderType for CONFIG type
ok 56 Check HeaderType for CONFIG_UPDATE type
ok 57 Check HeaderType for ENDORSER_TRANSACTION type
ok 58 checking the HeaderType decodePayloadBasedOnType()
#

 ** CertificateAuthority - constructor set get tests **


ok 59 Test Missing name parameter
ok 60 Test Missing url parameter
ok 61 Test good construction
ok 62 test method getName
ok 63 test method getCaName
ok 64 test method getUrl
ok 65 test method getConnectionOptions
ok 66 test method getTlsCACerts
ok 67 test method getRegistrar
# CertificateAuthority : {name : name, url : url}
ok 68 Successfully tested toString
#

 ** User - constructor set get tests **


ok 69 User constructor set get tests 1: new User getName was successful
ok 70 User constructor set get tests 1: setRoles getRoles was successful
ok 71 Test invalid enrollment without private key
ok 72 Test invalid enrollment with empty private key
ok 73 Test invalid enrollment without certificate
ok 74 Test invalid enrollment with empty certificate
ok 75 Test invalid enrollment with no mspId
ok 76 Test invalid enrollment with null mspId
ok 77 Test invalid enrollment with empty mspId
ok 78 User getCryptoSuite should initially be null
ok 79 User constructor test 2: new User cfg getName was successful
ok 80 User constructor test 2: new User cfg getRoles was successful
ok 81 User class setEnrollment() test
#

** ChannelEventHub tests


ok 82 Must pass in a channel
ok 83 Must pass in a peer
ok 84 Must pass in a clientContext that has the user context already initialized
ok 85 Check the Missing "onEvent" parameter
ok 86 Check the Block listener for block registration number
ok 87 Check the Missing "txid" parameter
ok 88 Check the Missing "onEvent" parameter
ok 89 Check the Transaction listener for transaction id
ok 90 Check the Missing "ccid" parameter
ok 91 Check the Missing "eventname" parameter
ok 92 Check the Missing "onEvent" parameter
ok 93 Check the Missing "listener_handle" parameter
ok 94 Check the No event registration for chaincode id
ok 95 Check that we able to see start block is not a number
ok 96 Check that we able to see end block is not a number
ok 97 Check that we able to see: This ChannelEventHub has not had an event from the peer
ok 98 Successfully utils.convertToLong strings to long
ok 99 Check that we able to see an error with a bad value on the convert
ok 100 Check that we able to see an error with a bad value on the convert
ok 101 Check that we able to see an error with a bad value on the convert
ok 102 Successfully utils.convertToLong integer to long
ok 103 Successfully utils.convertToLong a long
ok 104 Successfully utils.convertToLong a long
ok 105 Successfully utils.convertToLong a long
#

** ChannelEventHub block callback


ok 106 successfully registered block callbacks
ok 107 Check the first block listener is at index 1
ok 108 Check the 2nd block listener is at index 2
ok 109 Check the size of the blockOnEvents hash table
ok 110 Successfully called error callback from disconnect()
#

** ChannelEventHub block callback with replay


ok 111 Successfully registered block callbacks
ok 112 Check the first block listener is at index 1
ok 113 Should not be able to register for more than one with replay
ok 114 Successfully registered a playback block event
ok 115 Check the first block listener is at index 2
ok 116 Check the size of the blockOnEvents
#

** ChannelEventHub transaction callback


ok 117 successfully registered transaction callbacks
ok 118 Check the size of the transactionOnEvents hash table
ok 119 Checking for TransactionId (%s) has already been registered
ok 120 Check the size of the transactionOnEvents hash table
ok 121 Should have called error callback
#

** ChannelEventHub transaction callback with replay


ok 122 Successfully registered transaction callbacks
ok 123 Should not be able to register for more than one with replay
ok 124 Successfully registered a playback transaction event
ok 125 Check the size of the transactionOnEvents
ok 126 Check that the checkReplayEnd removes the startstop registered listener
ok 127 Checking for "startBlock" (%s) must not be larger than "endBlock" (%s)
#

** ChannelEventHub chaincode callback


ok 128 successfully registered chaincode callbacks
ok 129 Check the size of the chaincodeRegistrants hash table
ok 130 Size of the chaincodeRegistrants hash table should still be 1 because both listeners are for the same chaincode
ok 131 Size of the chaincodeRegistrants hash table should still be 2
ok 132 Successfully called chaincode error callback
#

** ChannelEventHub chaincode callback with replay


ok 133 Successfully registered chaincode callbacks
ok 134 Should not be able to register for more than one with replay
ok 135 Successfully registered a playback chaincode event
ok 136 Check the size of the _chaincodeRegistrants
#

** ChannelEventHub block callback no Error callback


ok 137 successfully registered block callbacks
#

** ChannelEventHub transaction callback no Error callback


ok 138 successfully registered transaction callbacks
#

** ChannelEventHub chaincode callback no Error callback


ok 139 successfully registered chaincode callbacks
#

** ChannelEventHub remove block callback


ok 140 successfully registered block callbacks
ok 141 Check the size of the blockOnEvents hash table
ok 142 successfuly unregistered block callback
ok 143 successfuly disconnected ChannelEventHub
#

** ChannelEventHub remove transaction callback


ok 144 successfully registered transaction callbacks
ok 145 successfuly unregistered transaction callback
ok 146 Check the size of the transactionOnEvents hash table
ok 147 successfuly disconnected ChannelEventHub
#

** ChannelEventHub remove chaincode callback


ok 148 successfully registered chaincode callbacks
ok 149 successfuly unregistered chaincode callback
ok 150 Size of the chaincodeRegistrants hash table should be 0
ok 151 successfuly disconnected ChannelEventHub
#

** ChannelEventHub remove block callback no Error callback


ok 152 successfully registered block callbacks
ok 153 successfuly unregistered block callback
ok 154 successfuly disconnected ChannelEventHub
#

** ChannelEventHub remove transaction callback no Error callback


ok 155 successfully registered transaction callbacks
ok 156 successfuly unregistered transaction callback
ok 157 successfuly disconnected ChannelEventHub
#

** ChannelEventHub remove chaincode callback no Error callback


ok 158 successfully registered chaincode callbacks
ok 159 successfuly unregistered chaincode callback
ok 160 successfuly disconnected ChannelEventHub
#

** Test the add and remove utilty used by the ChannelEventHub to add a setting to the options


ok 161 Checking that new options has the setting with the incoming value and options are null
ok 162 Checking that new options has the setting with the incoming value
ok 163 Checking that new options has the setting with the default value
ok 164 Checking that new options has the setting with the value from the config
ok 165 Checking that new options has setting not looked at
#

** ChannelEventHub test connect failure on transaction registration


# about to sleep 3000
ok 166 Successfully got the error call back tx test 2 ::Error: 14 UNAVAILABLE: Connect Failed
#

** EventHub test reconnect on block registration


ok 167 Check for The event hub has not been connected to the event source - block test 1
ok 168 Check the state of the connection
ok 169 Check the state of the connection
# about to sleep 5000
ok 170 Successfully got the error call back block test 2 ::Error: 14 UNAVAILABLE: Connect Failed
#

** Test the state conversion


ok 171 Checking that 0 state
ok 172 Checking that 1 state
ok 173 Checking that 2 state
ok 174 Checking that 3 state
ok 175 Checking that 4 state
ok 176 Checking that 5 state
ok 177 Checking that 99 state
#

 ** Channel - constructor test **


ok 178 Channel constructor test: getName successful
ok 179 Channel constructor tests: Missing name parameter
ok 180 Channel constructor tests: Missing clientContext parameter
#

 ** Channel - method tests **


ok 181 checking the channel addOrderer()
ok 182 checking channel getOrderers()
ok 183 Channel tests: checking that orderer already exists.
ok 184 checking channel toString
ok 185 checking the channel getMSPManager()
ok 186 checking the channel setMSPManager()
ok 187 checking the channel getOrganizations()
#

 **  Channel query target parameter tests
ok 188 Channel tests, queryBlockByHash(): checking for Blockhash bytes are required.
ok 189 Channel tests, queryBlockByHash(): "target" parameter not specified and no peers are set on Channel.
ok 190 Channel tests, queryBlockByHash(): checking for "target" parameter is an array, but should be a singular peer object.
ok 191 Channel tests, queryBlockByHash(): good target, checking for Missing userContext parameter.
ok 192 Channel tests, queryInfo(): "target" parameter not specified and no peers are set on Channel.
ok 193 Channel tests, queryInfo: checking for "target" parameter is an array, but should be a singular peer object.
ok 194 Channel tests, queryBlock(): Block number must be a positive integer with nothing specified
ok 195 Channel tests, queryBlock(): Block number must be a positive integer with "abc" specified
ok 196 Channel tests, queryBlock(): Block number must be a positive integer with "1.1" specified
ok 197 Channel tests, queryBlock(): Block number must be a positive integer with "-1" specified
ok 198 Channel tests, queryBlock(): "target" parameter not specified and no peers are set on Channel.
ok 199 Channel tests, queryBlock(): checking for "target" parameter is an array, but should be a singular peer object.
ok 200 Channel tests, queryTransaction(): checking for Missing "tx_id" parameter.
ok 201 Channel tests, queryTransaction(): "target" parameter not specified and no peers are set
ok 202 Channel tests, queryTransaction(): checking for "target" parameter is an array
ok 203 Channel tests, queryInstantiatedChaincodes(): checking for "target" parameter not specified and no peers are set
ok 204 Channel tests, queryInstantiatedChaincodes(): checking for "target" parameter is an array, but should be a singular peer object.
#

 ** Channel addPeer() duplicate tests **


ok 205 Expected error message "DuplicatePeer" thrown
ok 206 Duplicate peer not added to the channel(3 expected | 3 found)
ok 207 checking the channel close()
#

 ** Channel joinChannel() tests **


ok 208 Checking getGenesisBlock(): Missing "orderer" request parameter
ok 209 Checking joinChannel(): Missing all
ok 210 Checking joinChannel(): Missing txId
ok 211 Checking joinChannel(): Missing block input parameter
ok 212 Checking joinChannel(): "targets" parameter not specified and no peers are set on this Channel
ok 213 Checking joinChannel(): Target peer is not a valid peer object instance
ok 214 Checking joinChannel(): No network configuraton loaded
#

 ** Channel _buildDefaultEndorsementPolicy() tests **


ok 215 Checking that "initialize()" must be called before calling "instantiate()" that uses the endorsement policy
ok 216 Checking that after initializing the channel with dummy msps and msp manager, _buildEndorsementPolicy() can be called without error
ok 217 Checking default policy has an identities array
ok 218 Checking decoded default policy has an "identities" array
ok 219 Checking decoded default policy has two array items
ok 220 Checking decoded default policy has a ROLE identity
ok 221 Checking decoded default policy has an "n_out_of" policy
ok 222 Checking decoded default policy has an "n_out_of" policy with N = 1
ok 223 Checking policy spec: must have identities
ok 224 Checking policy spec: identities must be an array
ok 225 Checking policy spec: must have "policy"
ok 226 Checking policy spec: each identity must be "role", "organization-unit" or "identity"
ok 227 Checking policy spec: value identity type "role" must have valid "name" value
ok 228 Checking policy spec: value identity type "organization-unit"
ok 229 Checking policy spec: value identity type "identity"
ok 230 Checking policy spec: policy type must be "n-of" or "signed-by"
ok 231 Building successfully from valid policy spec ONE_OF_TWO_ORG_MEMBER
ok 232 Checking decoded custom policy has two items
ok 233 Checking decoded custom policy has "1 out of"
ok 234 Checking decoded custom policy has two target policies
ok 235 Building successfully from valid policy spec TWO_OF_TWO_ORG_MEMBER
ok 236 Checking decoded custom policy has "2 out of"
ok 237 Checking decoded custom policy has two target policies
ok 238 Building successfully from valid policy spec ONE_OF_TWO_ORG_MEMBER_AND_ADMIN
ok 239 Checking decoded custom policy has "2 out of"
ok 240 Checking decoded custom policy has two target policies
ok 241 Checking decoded custom policy has "1 out of" inside the "2 out of"
ok 242 Checking decoded custom policy has two target policies inside the "1 out of" inside the "2 out of"
ok 243 Checking decoded custom policy has "signed-by: 2" inside the "2 out of"
ok 244 Building successfully from valid policy spec CRAZY_SPEC
ok 245 Checking decoded custom policy has "2 out of"
ok 246 Checking decoded custom policy has two target policies
ok 247 Checking decoded custom policy has "1 out of" inside the "2 out of"
ok 248 Checking decoded custom policy has two target policies inside the "1 out of" inside the "2 out of"
ok 249 Checking decoded custom policy has "1 out of" inside the "2 out of"
ok 250 Checking decoded custom policy has two target policies inside the "1 out of" inside the "2 out of"
ok 251 Checking decoded custom policy has "2 out of " inside "1 out of" inside the "2 out of"
ok 252 Checking decoded custom policy has 3 target policies for "2 out of " inside "1 out of" inside the "2 out of"
ok 253 Checking decoded custom policy has "2 out of " inside "1 out of" inside the "2 out of"
ok 254 Checking decoded custom policy has 2 target policies for "2 out of " inside "1 out of" inside the "2 out of"
ok 255 Checking decoded custom policy has "signed-by: 2" for "2 out of " inside "1 out of" inside the "2 out of"
ok 256 Checking decoded custom policy has "1 out of" inside "2 out of " inside "1 out of" inside the "2 out of"
#

 ** Channel sendTransactionProposal() tests **


ok 257 Channel tests, sendTransactionProposal(): "targets" parameter not specified and no peers are set on this Channel
ok 258 Channel tests, sendTransactionProposal(): Missing request object for this transaction proposal
ok 259 Channel tests, sendTransactionProposal(): Missing "args" in Transaction
ok 260 Channel tests, sendTransactionProposal(): Missing "chaincodeId" parameter
ok 261 Channel tests, sendTransactionProposal(): Missing "txId" parameter in the proposal request
#

 ** Channel queryByChaincode() tests **


ok 262 Channel tests, queryByChaincode(): Missing request object for this queryByChaincode call.
ok 263 Channel tests, queryByChaincode(): "targets" parameter not specified and no peers are set.
ok 264 Channel tests, queryByChaincode(): Missing "args" in Transaction
ok 265 Channel tests, queryByChaincode(): Missing "chaincodeId" parameter
#

 ** Channel sendTransaction() tests **


ok 266 Channel tests, sendTransaction: Missing request object.
ok 267 Channel tests, sendTransaction: Missing "proposalResponses" object.
ok 268 Channel tests, sendTransaction: Missing "proposal" object.
ok 269 Channel tests, sendTransaction: no valid endorsements found.
#

** TEST ** orderer via channel setOrderer/getOrderer
ok 270 Successfully set the new orderer URL
ok 271 Successfully retrieved the new orderer URL from the channel
ok 272 Successfully updated the orderer URL
ok 273 Successfully retrieved the upated orderer URL from the channel
ok 274 Successfully removed orderer
#

** TEST ** orderer via channel set/get bad address
ok 275 Test setting a bad orderer address
ok 276 Test setting an empty orderer address
#

** TEST ** verify compareProposalResponseResults
ok 277 Test compareProposalResponseResults with empty parameter
ok 278 Test compareProposalResponseResults with an object parameter
ok 279 Test compareProposalResponseResults with an empty array parameter
ok 280 Test compareProposalResponseResults with an array without the correct endorsements parameter
#

** TEST ** verify verifyProposalResponse
ok 281 Test verifyProposalResponse with empty parameter
ok 282 Test verifyProposalResponse with an object parameter
ok 283 Test verifyProposalResponse with an empty array parameter
ok 284 Test verifyProposalResponse with an array without the correct endorsements parameter
#

*** Test per-call timeout support ***

ok 285 Peer.sendProposal() is called exactly twice
ok 286 Peer.sendProposal() is called first time with exactly 2 arguments
ok 287 Peer.sendProposal() is called first time with a overriding timeout of 12345 (milliseconds)
ok 288 Peer.sendProposal() is called 2nd time with exactly 2 arguments
ok 289 Peer.sendProposal() is called 2nd time with a overriding timeout of 12345 (milliseconds)
#

 ** index.js **


ok 290 should be equal
ok 291 Should be able to instantiate a new instance of "Client" require
ok 292 Should be able to call "newChannel" on the new instance of "Client"
#

 ** eventhub **


ok 293 Should be able to call "newEventHub" on the new instance of "hfc"
#

 ** Client.js Tests: CryptoSuite() methods **


ok 294 Should return null when CryptoSuite has not been set
ok 295 Successfully called newCryptoSuite()
ok 296 Successfully called getCryptoSuite()
ok 297 Should return null when CryptoSuite has been set to null
#

 ** Client.js Tests: getUserContext() method **


ok 298 Should not throw an error when argument list is empty
ok 299 Should return null when requested for an invalid user
ok 300 Check that error condition is properly handled when only a truthy value is passed in
ok 301 Check that error condition is properly handled when "checkPersistence" is true but "name" is not valid string
ok 302 Check that error condition is properly handled when "checkPersistence" is true but "name" is not valid string
ok 303 Should not return null but a promise when "checkPersistence" is true
ok 304 Promise should resolve to a null when using an invalid user name
#

 ** Client.js Tests: user persistence and loading **


ok 305 Client tests: getUserContext successful null user name.
ok 306 Client tests: Should throw "Cannot save user to state store when userContext is null."
ok 307 Client tests: Should throw "Cannot save null userContext."
ok 308 Client tests: getUserContext with no context in memory or persisted returns null
ok 309 Client tests: successfully setUserContext with skipPersistence.
ok 310 Client tests: getUserContext not persisted/skipPersistence was successful.
ok 311 Client tests: Should throw "Cannot save user to state store when stateStore is null"
ok 312 Checking channel names match
ok 313 Client tests: checking that channel already exists.
ok 314 Client tests: getChannel()
ok 315 Client tests: Should throw Error: Channel not found for name someOtherChannel.
ok 316 Client tests: checking state store parameter implementing required functions
ok 317 Client setKeyValueStore test: Successfully created new directory
ok 318 Client getStateStore test: Successfully set value, result: testValue
ok 319 Client getStateStore test: Verified the file for key keyValFileStoreName does exist
#

 ** testing devmode set and get calls on client **


ok 320 should be equal
ok 321 checking the set of DevMode
ok 322 checking DevMode
#

 ** testing query calls fail without correct parameters on client **


ok 323 should be equal
ok 324 Successfully caught missing request error
ok 325 Successfully caught No network configuraton loaded error
ok 326 Successfully caught missing request error
ok 327 Successfully caught no network loaded error
ok 328 Successfully caught wrong request error
ok 329 Successfully caught wrong request error
ok 330 Successfully caught wrong object request error
#

 ** testing get and new peer calls on client **


ok 331 should be equal
ok 332 Should be able to call "newPeer" with a valid URL
#

 ** testing get and new orderer calls on client **


ok 333 should be equal
ok 334 Should be able to call "newOrderer" with a valid URL
#

 ** testing get transaction ID call on client **


ok 335 should be equal
ok 336 Test - No identity has been assigned to this client
#

 ** Config **


ok 337 checking that able to get "request-timeout" value from an additional configuration file
ok 338 checking that able to test-2 value from an additional configuration file
ok 339 checking that test-3 environment values are used
ok 340 checking that test-4 argument values are used
ok 341 checking that test-5 program values are used
ok 342 checking that test-6 is enviroment mapped value
#

 ** client installChaincode() tests **


ok 343 P2 - Successfully caught missing chaincodeVersion error
ok 344 P3 - Successfully caught missing chaincodeId error
ok 345 P4 - Successfully caught error: Missing peer objects in install chaincode request
ok 346 P5 - Successfully caught missing request error
ok 347 p6 - Successfully caught bad request error
ok 348 p7 - Successfully caught bad request error
ok 349 P1 - Successfully caught missing chaincodePath error
#

 ** Client createChannel() tests **


ok 350 Successfully caught missing orderer error
ok 351 Successfully caught missing request error
ok 352 Successfully caught missing config request error
ok 353 Successfully caught missing name request error
ok 354 Successfully caught missing signatures request error
ok 355 Successfully caught request parameter must be an array error
ok 356 Successfully caught request parameter must have txId error
#

 ** createUser error path - missing required opt parameter **


ok 357 Should throw Client.createUser missing required 'opts' parameter.
#

 ** createUser error path - missing required username **


ok 358 Should throw Client.createUser parameter 'opts username' is required.
#

 ** createUser error path - missing required mspid **


ok 359 Should throw Client.createUser parameter 'opts mspid' is required.
#

 ** createUser error path - missing required cryptoContent **


ok 360 Should throw Client.createUser parameter 'opts cryptoContent' is required.
#

 ** createUser error path - missing required cryptoContent signedCert or signedCertPEM **


ok 361 Should throw Client.createUser either 'opts cryptoContent signedCert or signedCertPEM' is required.
#

 ** createUser error path - missing required cryptoContent privateKey or privateKeyPEM **


ok 362 Should throw Client.createUser one of 'opts cryptoContent privateKey, privateKeyPEM or privateKeyObj' is required.
#

 ** createUser error path - no keyValueStore **


ok 363 createUser, error expected: Failed to load key or certificate and save to local stores
#

 ** createUser success path - no cryptoKeyStore **


ok 364 createUser, got user
#

 ** test related APIs for create channel **


ok 365 Client tests: Channel configuration update parameter is required.
ok 366 Client tests: Channel configuration update parameter is required.
#

 ** test internal method to rebuild ConfigSignatures **


ok 367 check signature headers are the same
ok 368 check signatures are the same
ok 369 check signature headers are the same
ok 370 check signatures are the same
#

*** Test per-call timeout support ***

ok 371 Successfully caught the Missing signatures request parameter for the new channel
ok 372 Successfully caught the Signatures request parameter must be an array of signatures
ok 373 Successfully caught the Missing txId request parameter
ok 374 Successfully caught the Missing "orderer" request parameter
ok 375 Successfully caught the "orderer" request parameter is not valid
ok 376 Successfully caught the Missing name request parameter
ok 377 Successfully caught the Missing name request parameter
ok 378 Peer.sendProposal() is called exactly twice
ok 379 Peer.sendProposal() is called first time with exactly 2 arguments
ok 380 Peer.sendProposal() is called first time with a overriding timeout of 12345 (milliseconds)
ok 381 Peer.sendProposal() is called 2nd time with exactly 2 arguments
ok 382 Peer.sendProposal() is called 2nd time with a overriding timeout of 12345 (milliseconds)
#

*** Test error condition on network config ***

ok 383 Check that No network configuration has been loaded
#

*** Test normalizeX509 ***

ok 384 Check that a bad strean will throw error
ok 385 Check that the normalized CERT has the standalone start line
ok 386 Check that the normalized CERT has the standalone end line
#

 Test _getChaincodeDeploymentSpec ***

#

 ** config testing **


ok 387 the timeout is correct, which means the configs were loaded in the correct order
ok 388 Got to the end
#

** CouchDBKeyValueStore tests
ok 389 Error checking in the constructor: missing opts
ok 390 Error checking in the constructor: opts object missing required "url"
ok 391 Successfully got chaincode deployment spec from source
ok 392 Successfully got chaincode deployment spec for existing package
ok 393 Sleep complete
ok 394 Successfully rejected the construction request due to invalid URL
ok 395 Successfully connected the key value store to couchdb at localhost:5985
ok 396 Check "_database" value of the constructed store object
ok 397 Check result of setValue()
Disconnecting the mock couchdb server
ok 398 Check result of getValue()
#

** CryptoKeyStore tests **


ok 399 Test invalid constructor calls: missing options parameter
ok 400 Test invalid constructor calls: missing "path" property in the "options" parameter
ok 401 Successfully saved private key in store
ok 402 Check that the private key has been saved with the proper <SKI>-priv index
ok 403 Successfully read private key from store using SKI
ok 404 Test if the recovered key is a private key
ok 405 Check that the public key has been saved with the proper <SKI>-pub index
ok 406 Successfully read public key from store using SKI
ok 407 Test if the recovered key is a private key
ok 408 Successfully read public key from store using SKI
ok 409 Test if the recovered key is a public key
#

** CryptoKeyStore tests - couchdb based store tests - use configSetting **


ok 410 Successfully saved private key in store based on couchdb
ok 411 Successfully verified private key persisted in couchdb
ok 412 Successfully read private key from store using SKI
ok 413 Test if the recovered key is a private key
ok 414 Successfully verified public key persisted in couchdb
ok 415 Successfully read public key from store using SKI
ok 416 Test if the recovered key is a private key
ok 417 Successfully read public key from store using SKI
Disconnecting the mock couchdb server
ok 418 Test if the recovered key is a public key
#

** CryptoKeyStore tests - couchdb based store tests - use constructor argument **


ok 419 Successfully saved private key in store based on couchdb
ok 420 Successfully verified private key persisted in couchdb
ok 421 Successfully read private key from store using SKI
ok 422 Test if the recovered key is a private key
ok 423 Successfully verified public key persisted in couchdb
ok 424 Successfully read public key from store using SKI
ok 425 Test if the recovered key is a private key
ok 426 Successfully read public key from store using SKI
Disconnecting the mock couchdb server
ok 427 Test if the recovered key is a public key
#

** CryptoKeyStore tests - newCryptoKeyStore tests **


ok 428 Returned instance should have store config opts of {"path":"tmp/keyValStore1"}
ok 429 Returned instance should have store config superClass
ok 430 Returned instance should have store config opts.path of C:\Users\kiat\.hfc-key-store
ok 431 Returned instance should have store config superClass
ok 432 Returned instance should have store config opts.path of C:\Users\kiat\.hfc-key-store
ok 433 Returned instance should have store config superClass
ok 434 Returned instance should have store config opts of {"path":"tmp/keyValStore1"}
ok 435 Returned instance should have store config superClass
#

** CryptoKeyStore tests - getKey error tests **


ok 436 Test missing cryptoKeyStore: cryptoSuite.getKey
#

** utils.newCryptoSuite tests **


ok 437 Should return an instance of CryptoSuite_ECDSA_AES
ok 438 Returned instance should have keysize of 384
ok 439 Default test: should return an instance of CryptoSuite_ECDSA_AES
ok 440 Returned instance should have keysize of 384
ok 441 Should return an instance of CryptoSuite_ECDSA_AES
ok 442 Returned instance should have keysize of 256
ok 443 Error: Win32 error 126/
#

 ** CryptoSuite_ECDSA_AES - error tests **


ok 444 Test missing cryptoKeyStore: cryptoSuite.importKey
ok 445 Test missing cryptoKeyStore: cryptoSuite.generateKey
#

 ** CryptoSuite_ECDSA_AES - ephemeral true tests **


ok 446 importKey returned key using ephemeral true
ok 447 generateKey returned key using ephemeral true
#

 ** CryptoSuite_ECDSA_AES - function tests **


ok 448 CryptoSuite_ECDSA_AES function tests: default instance has "_ecdsaCurve" and "_ecdsa" properties
ok 449 CryptoSuite_ECDSA_AES function tests: using "SHA2" hashing algorithm with default key size which should be 256
ok 450 CryptoSuite_ECDSA_AES function tests: using "SHA2" hashing algorithm with default key size which should be 256
ok 451 CryptoSuite_ECDSA_AES function tests: using "SHA2" hashing algorithm with default key size which should be 384
ok 452 CryptoSuite_ECDSA_AES function tests: cryptoUtils generated public key curveName == secp256r1
ok 453 CryptoSuite_ECDSA_AES function tests: ccryptoUtils generated public key curveName == secp256r1
ok 454 CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 256
ok 455 CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 256
ok 456 CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 384
ok 457 CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 384
ok 458 CryptoSuite_ECDSA_AES function tests: ccryptoUtils generated public key curveName == secp384r1
ok 459 CryptoSuite_ECDSA_AES function tests: verify generateKey return object
ok 460 CryptoSuite_ECDSA_AES function tests: using "SHA3" hashing algorithm with key size 384
ok 461 CryptoSuite_ECDSA_AES function tests: verify generateKey ephemeral=true return object
ok 462 CryptoSuite_ECDSA_AES function tests: setting key size 123 should throw Illegal level error
ok 463 CryptoSuite_ECDSA_AES function tests: setting hash algo to 12345 should throw Illegal Hash function family
ok 464 CryptoSuite_ECDSA_AES function tests: sign() should throw "A valid key is required to sign"
ok 465 CryptoSuite_ECDSA_AES function tests: sign() should throw "A valid message is required to sign"
ok 466 Valid signature object generated from sign()
ok 467 CryptoSuite_ECDSA_AES function tests: sign() method produced proper signature that was successfully verified
ok 468 Valid signature object generated from sign()
ok 469 CryptoSuite_ECDSA_AES function tests: sign() method produced proper signature that was successfully verified
ok 470 CryptoSuite_ECDSA_AES function tests: verify() should throw "A valid key is required to verify"
ok 471 CryptoSuite_ECDSA_AES function tests: verify() should throw "A valid signature is required to verify"
ok 472 CryptoSuite_ECDSA_AES function tests: verify() should throw "A valid message is required to verify"
ok 473 CryptoSuite_ECDSA_AES function tests: verify() method
ok 474 CryptoSuite_ECDSA_AES function tests: verify() method
ok 475 Test imported public key isPrivate()
ok 476 Test imported public key SKI
ok 477 Check that the imported public key has been saved in the key store
ok 478 Test imported private key isPrivate
ok 479 Test imported private key SKI
ok 480 Check that the imported private key has been saved in the key store
ok 481 Check that the imported private key can properly sign messages
#

** bccsp_pkcs11 tests **


ok 482 Checking: keySize must be specified
ok 483 Checking: only 256 or 384 bits key sizes are supported
ok 484 Checking: PKCS11 key size is specified and valid
ok 485 Checking: PKCS11 lib must be specified
ok 486 Checking: PKCS11 slot number invalid
ok 487 Checking: PKCS11 slot must be set to a number
ok 488 Checking: PKCS11 PIN must be set to a string
not ok 489 Checking: for valid PIN failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid PIN failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:104:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
ok 490 Checking: for valid usertype
not ok 491 Checking: for valid usertype failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid usertype failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:121:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
ok 492 Checking: for valid readwrite
not ok 493 Checking: for valid readwrite failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:138:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
ok 494 Checking: PKCS11 lib must be specified
ok 495 Checking: PKCS11 slot must be set to a number
not ok 496 Checking: for valid PIN in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid PIN in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:163:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
ok 497 Checking: for valid usertype
ok 498 Checking: for valid usertype
not ok 499 Checking: for valid usertype in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid usertype in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:188:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 500 Checking: for valid usertype in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid usertype in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:197:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
ok 501 Checking: for valid readwrite
ok 502 Checking: for valid readwrite
not ok 503 Checking: for valid readwrite in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:222:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 504 Checking: for valid readwrite in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:230:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 505 Checking: for valid readwrite in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:238:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 506 Checking: for valid readwrite in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:246:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 507 Checking: for valid readwrite in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:254:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 508 Checking: for valid readwrite in config failed with ::Error: Win32 error 126 at Error (native) PKCS11::Load:136
  ---
    operator: fail
    stack: |-
      Error: Checking: for valid readwrite in config failed with ::Error: Win32 error 126
          at Error (native) PKCS11::Load:136
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at checkError (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:94:6)
          at test (d:\Work\Fabric\fabric-sdk-node\test\unit\cryptosuite-pkcs11.js:262:3)
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
#

 ** ECDSA Key Impl tests **


ok 509 ECDSA Impl test: catch missing key param
ok 510 ECDSA Impl test: catch missing key type of "EC"
ok 511 ECDSA Impl test: catch invalid key type
ok 512 ECDSA Impl test: catch missing "prvKeyHex"
ok 513 ECDSA Impl test: catch missing "pubKeyHex" property
ok 514 ECDSA Impl test: catch "pubKeyHex" with null value
ok 515 ECDSA Impl test: test a valid key
ok 516 Checking generated SKI hash string for 256 curve keys
ok 517 Checking that a private key instance allows toBytes()
ok 518 Checking generated SKI hash string for 384 curve keys
ok 519 Checking if key is symmetric
ok 520 Checking if key is private
ok 521 Checking isPrivate() logic
ok 522 Checking toBytes() output
ok 523 Checking generated SKI hash string for 256 curve public key
ok 524 Checking to dump a public ECDSAKey object to bytes
ok 525 Checking generated SKI hash string for 384 curve public key
ok 526 Checking to dump a public ECDSAKey object to bytes
ok 527 Checking if both keys are public
ok 528 Checking getPublicKey() logic
ok 529 Checking toBytes() output
ok 530 Checking that a CSR cannot be generated from a public key
ok 531 Checking that CSR is not generated for a malformed subject
ok 532 Checking CSR subject matches subject from request
ok 533 Checking CSR public key matches requested public key
#

** EventHub tests


ok 534 Must pass in a clientContext
ok 535 Must pass in a clientContext that has the getUserContext() function
ok 536 Must pass in a clientContext that has the user context already initialized
ok 537 Must pass in a clientContext that has the user context already initialized
ok 538 Must not allow connect() when peer address has not been set
ok 539 Must not allow a bad url without protocol to be set
ok 540 Must not allow an http url to be set
ok 541 Must not allow an https url to be set
ok 542 Test valid url connect and disconnect
ok 543 Check the Missing "onEvent" parameter
ok 544 Check the Missing "block_registration_number" parameter
ok 545 Check the Missing "txid" parameter
ok 546 Check the Missing "onEvent" parameter
ok 547 Check the Missing "txid" parameter
ok 548 Check the Missing "ccid" parameter
ok 549 Check the Missing "eventname" parameter
ok 550 Check the Missing "onEvent" parameter
ok 551 Check the Missing "listener_handle" parameter
ok 552 Check the event hub must be connected before the block event listener can be registered
ok 553 Check the event hub must be connected before the chaincode event listener can be registered
ok 554 Check the event hub must be connected before the tranaction event listener can be registered
#

** EventHub block callback


ok 555 successfully registered block callbacks
ok 556 Check the first block listener is at index 1
ok 557 Check the 2nd block listener is at index 2
ok 558 Check the size of the blockOnEvents hash table
ok 559 Check the size of the blockOnErrors hash table
ok 560 Successfully called error callback from disconnect()
#

** EventHub transaction callback


ok 561 successfully registered transaction callbacks
ok 562 Check the size of the transactionOnEvents hash table
ok 563 Check the size of the transactionOnErrors hash table
ok 564 Size of the transactionOnEvents hash table should still be 1 since the listeners are for the same txId
ok 565 Size of the transactionOnErrors hash table should still be 1 since the listeners are for the same txId
ok 566 Check the size of the transactionOnEvents hash table
ok 567 Check the size of the transactionOnErrors hash table
ok 568 Successfully called transaction error callback
#

** EventHub chaincode callback


ok 569 successfully registered chaincode callbacks
ok 570 Check the size of the chaincodeRegistrants hash table
ok 571 Size of the chaincodeRegistrants hash table should still be 1 because both listeners are for the same chaincode
ok 572 Size of the chaincodeRegistrants hash table should still be 2
ok 573 Successfully called chaincode error callback
#

** EventHub block callback no Error callback


ok 574 successfully registered block callbacks
#

** EventHub transaction callback no Error callback


ok 575 successfully registered transaction callbacks
#

** EventHub chaincode callback no Error callback


ok 576 successfully registered chaincode callbacks
#

** EventHub remove block callback


ok 577 successfully registered block callbacks
ok 578 Check the size of the blockOnEvents hash table
ok 579 successfuly unregistered block callback
ok 580 successfuly disconnected eventhub
#

** EventHub remove transaction callback


ok 581 successfully registered transaction callbacks
ok 582 successfuly unregistered transaction callback
ok 583 Check the size of the transactionOnEvents hash table
ok 584 successfuly disconnected eventhub
#

** EventHub remove chaincode callback


ok 585 successfully registered chaincode callbacks
ok 586 successfuly unregistered chaincode callback
ok 587 Size of the chaincodeRegistrants hash table should be 0
ok 588 successfuly disconnected eventhub
#

** EventHub remove block callback no Error callback


ok 589 successfully registered block callbacks
ok 590 successfuly unregistered block callback
ok 591 successfuly disconnected eventhub
#

** EventHub remove transaction callback no Error callback


ok 592 successfully registered transaction callbacks
ok 593 successfuly unregistered transaction callback
ok 594 successfuly disconnected eventhub
#

** EventHub remove chaincode callback no Error callback


ok 595 successfully registered chaincode callbacks
ok 596 successfuly unregistered chaincode callback
ok 597 successfuly disconnected eventhub
#

** Test the add and remove utilty used by the EventHub to add a setting to the options


ok 598 Checking that new options has the setting with the incoming value and options are null
ok 599 Checking that new options has the setting with the incoming value
ok 600 Checking that new options has the setting with the default value
ok 601 Checking that new options has the setting with the value from the config
ok 602 Checking that new options has setting not looked at
#

** EventHub test actions when connect failures on transaction registration


ok 603 Check for The event hub has not been connected to the event source - tx test 1
ok 604 Check for The event hub has not been connected to the event source - tx test 2
# about to sleep 3000
ok 605 Successfully caught missing private key expected from a user enrollment object
ok 606 Sleep complete
ok 607 Successfully got the error call back tx test 2 ::Error: 14 UNAVAILABLE: Connect Failed
ok 608 Sleep complete
ok 609 Check for The event hub has not been connected to the event source - tx test 3
# about to sleep 3000
ok 610 Sleep complete
ok 611 Check for The event hub has not been connected to the event source - tx test 4
#

** EventHub test actions when connect failures on block registration


ok 612 Check for The event hub has not been connected to the event source - block test 1
ok 613 Check for The event hub has not been connected to the event source - block test 2
# about to sleep 3000
ok 614 Successfully got the error call back tx test 4 ::Error: 14 UNAVAILABLE: Connect Failed
ok 615 Successfully got the error call back block test 2 ::Error: 14 UNAVAILABLE: Connect Failed
ok 616 Sleep complete
ok 617 Check for The event hub has not been connected to the event source - block test 3
# about to sleep 3000
ok 618 Sleep complete
ok 619 Check for The event hub has not been connected to the event source - block test 4
#

** EventHub test actions when connect failures on chaincode registration


ok 620 Check for The event hub has not been connected to the event source - chaincode test 1
ok 621 Check for The event hub has not been connected to the event source - chaincode test 2
# about to sleep 3000
ok 622 Successfully got the error call back block test 4 ::Error: 14 UNAVAILABLE: Connect Failed
ok 623 Successfully got the error call back chaincode test 2 ::Error: 14 UNAVAILABLE: Connect Failed
ok 624 Sleep complete
ok 625 Check for The event hub has not been connected to the event source - chaincode test 3
# about to sleep 3000
ok 626 Sleep complete
ok 627 Check for The event hub has not been connected to the event source - chaincode test 4
# FabricCAClient: Test constructor
ok 628 Throw error for missing protocol
ok 629 Throw error for invalid protocol
ok 630 HTTP is a valid protocol
ok 631 HTTPS is a valid protocol
ok 632 Throw error for missing hostname
ok 633 Should not throw error if port is not set
ok 634 Throw error for invalid port
ok 635 Integer is a valid type for port
ok 636 Add tlsOptions to client connect_opts -- all default values
ok 637 Check default tlsOptions.verify
ok 638 Check default tlsOptions.trustedRoots
ok 639 Add tlsOptions to client connect_opts -- non default values
ok 640 Check specified tlsOptions.verify
ok 641 Check size of tlsOptions.trustedRoots[]
ok 642 Check specified tlsOptions.trustedRoots[] value
ok 643 Add tlsOptions to client connect_opts -- non default values
ok 644 Check specified tlsOptions.verify
ok 645 Check size of tlsOptions.trustedRoots[]
ok 646 Check specified tlsOptions.trustedRoots[] value
# FabricCAClient: Test _pemToDer static method
ok 647 Throw an error when input is not PEM-encoded
ok 648 Sucessfully converted ecert from PEM to DER
# FabricCAServices:  Test newCryptoSuite() function
ok 649 Successfully called getCryptoSuite()
# FabricCAServices:  Test newCryptoKeyStore() function
ok 650 cryptoKeyStore is not set on a new cryptoSuite
ok 651 Successfully called getCryptoSuite() with cryptoKeyStore set
# FabricCAServices:  Test optional constructor
ok 652 FabricCAServices constructor with object and just url
ok 653 Caname should have been passed correctly
ok 654 checket getter method for caname
ok 655 FabricCAServices constructor with object and just url
ok 656 CryptoSuite should have been passed correctly
ok 657 FabricCAServices constructor with object and just url
ok 658 tlsOptions should have been passed correctly
ok 659 FabricCAServices constructor with object and just url
# FabricCAServices:  Test getCryptoSuite() function
ok 660 Successfully called getCrypto()
# FabricCAServices: Test register() function
ok 661 Must fail if missing request argument
ok 662 Must fail if missing request.enrollmentID argument
ok 663 Must fail if missing request argument
ok 664 Must fail if missing registrar argument
ok 665 Must fail if registrar argument is not a User object
ok 666 Must fail if missing arguments
# FabricCAServices: Test enroll with missing parameters
ok 667 Verify error message returned by enroll()
ok 668 Verify error message returned by enroll(no enrollment ID)
ok 669 Verify error message returned by enroll(no enrollment secret)
ok 670 Verify error message returned by enroll(req.attr_reqs is not an array)
ok 671 Verify error message returned by enroll(req.att_regs is missing the attribute name)
# FabricCAServices: Test revoke() function
ok 672 Test missing request
ok 673 Test missing both enrollmentID and aki/serial
ok 674 Test having valid "aki" but missing "serial"
ok 675 Test having valid "serial" but missing "aki"
ok 676 Test invalid "signingIdentity"
ok 677 Test invalid "signingIdentity"
ok 678 Successfully rejected the request to revoke due to invalid parameters
# FabricCAServices: Test reenroll() function
ok 679 Must throw error when missing current user
ok 680 Must throw error when current user is not a valid User object
ok 681 Must throw error when current user is not a valid User object
ok 682 Must throw error when Invalid re-enroll request, attr_reqs must be an array of AttributeRequest objects
ok 683 Must throw error when Invalid re-enroll request, attr_reqs object is missing the name of the attribute
ok 684 Must throw error when current user enrollment certificate does not have a "CN" value
ok 685 Must throw error when target certificate does not contain a common name
ok 686 Must not throw error when target certificate is valid and contains a common name
ok 687 Must not throw error when current user is valid
# FabricCAServices: Test static method normalizeX509()
ok 688 Check that the normalized CERT has the standalone start line
ok 689 Check that the normalized CERT has the standalone end line
ok 690 Check that the normalized CERT has the standalone start line
ok 691 Check that the normalized CERT has the standalone end line
ok 692 Check that the normalized CERT has the standalone start line
ok 693 Check that the normalized CERT has the standalone end line
ok 694 Must throw error when target certificate does not contain a begin and end
# FabricCAServices: Test _parseURL() function
ok 695 Check that protocol is set correctly to 'http'
ok 696 Check that hostname is set correctly
ok 697 Check that port is set correctly
ok 698 Check that protocol is set correctly to 'https'
ok 699 Check that hostname is set correctly
ok 700 Check that port is set correctly
ok 701 Check default port value
ok 702 Throw error for missing hostname
ok 703 Throw error for invalid protocol
ok 704 Throw error for invalid protocol
ok 705 Throw error for missing protocol
ok 706 Throw error for invalid protocol
# FabricCAServices: Test toString() function
ok 707 toString() returned a string of length 53
# FabricCAClient: Test enroll with missing parameters
ok 708 Enrollment should fail when missing required parameters
# FabricCAClient: Test register with missing parameters
ok 709 Test missing all parameters
ok 710 Test missing maxEnrollments parameter
ok 711 Test wrong typeof maxEnrollments parameter
# FabricCAClient: Test revoke with missing parameters
ok 712 Test missing all parameters
#

 ** FileKeyValueStore - read and write test **


ok 713 FileKeyValueStore read and write test: Successfully created new directory for testValueStore
ok 714 FileKeyValueStore read and write test: Successfully set value
ok 715 FileKeyValueStore read and write test: Verified the file for key keyValFileStoreName does exist
ok 716 Properly failed due to mockup user object missing signer
ok 717 FileKeyValueStore read and write test: Successfully retrieved value
ok 718 FileKeyValueStore error check tests: Delete store & getValue test. getValue() returns null as expected
ok 719 FileKeyValueStore error check tests: Delete store & setValue test. setValue() failed as expected: Error: ENOENT: no such file or directory, open 'C:\Users\kiat\AppData\Local\Temp\hfc\kvsTemp\keyValFileStoreName'
#

** FileKeyValueStore error check tests **


ok 720 FileKeyValueStore error check tests: new FileKeyValueStore with no options should throw "Must provide the path to the directory to hold files for the store."
ok 721 FileKeyValueStore error check tests: new FileKeyValueStore with no options.path should throw "Must provide the path to the directory to hold files for the store."
# sha2_256
ok 722 hash result match
ok 723 prototype function, static function match
# sha2_384
ok 724 hash result match
ok 725 prototype function, static function match
# sha3_256
ok 726 hash result match
ok 727 prototype function, static function match
ok 728 hashSimple match
# sha3_384
ok 729 hash result match
ok 730 prototype function, static function match
ok 731 hashSimple match
# IdentityService: Test create() function
ok 732 Must fail if missing request argument
ok 733 Must fail if missing req.enrollmentID and req.affiliation argument
ok 734 Must fail if missing registrar argument
ok 735 Must fail if registrar argument is not a User object
ok 736 Must fail if missing signingIdentity
# IdentityService: Test getOne() function
ok 737 Must fail if missing or invalid enrollmentID argument
ok 738 Must fail if missing registrar argument
ok 739 Must fail if registrar argument is not a User object
ok 740 Must fail if missing signingIdentity
# IdentityService: Test getAll() function
ok 741 Must fail if missing registrar argument
ok 742 Must fail if registrar argument is not a User object
ok 743 Must fail if missing signingIdentity
# IdentityService: Test delete() function
ok 744 Must fail if missing or invalid enrollmentID argument
ok 745 Must fail if missing registrar argument
ok 746 Must fail if registrar argument is not a User object
ok 747 Must fail if missing signingIdentity
# IdentityService: Test update() function
ok 748 Must fail if missing or invalid enrollmentID argument
ok 749 Must fail if missing registrar argument
ok 750 Must fail if registrar argument is not a User object
ok 751 Must fail if missing signingIdentity
#

 ** Identity class tests **


ok 752 Checking required input parameters
ok 753 Checking required input parameters
ok 754 Checking required input parameters
ok 755 Checking required config parameter for MSP constructor
ok 756 Checking required config parameter "id" for MSP constructor
ok 757 Checking required config parameter "cryptoSuite" for MSP constructor
ok 758 Checking required config parameter "admins" for MSP constructor
ok 759 Checking required parameter "cryptoSuite"
ok 760 Checking required parameter "key"
ok 761 Checking required input parameters
ok 762 Checking required input parameters
ok 763 Checking required input parameters
ok 764 Checking required input parameters
ok 765 deserializeIdentity call without promise
ok 766 Identity class function tests: deserialized certificate
ok 767 Identity class function tests: deserialized public key
ok 768 Identity class function tests: deserialized public key ecparam check
ok 769 Test Signer class getPublicKey() method
ok 770 Test invalid hashFunction parameter for the sign() method
ok 771 Test SigningIdentity sign() method
ok 772 Test Identity verify() method
#

** MSP Tests **


ok 773 Check MSPManager.loadMSPs() arguments: must be an array
ok 774 Check MSPManager.loadMSPs() arguments: each config must have getType() returning a number representing types
ok 775 Check MSPManager.loadMSPs() arguments: each config must have getConfig() returning a valid FabricMSPConfig
ok 776 Check MSPManager.loadMSPs() arguments: each config must have getConfig() returning a valid FabricMSPConfig
ok 777 Successfully loaded msp config for org0
ok 778 Successfully loaded msp config for org1
ok 779 Check loaded MSP instance for id
ok 780 Check loaded MSP instance of non-null root certs
ok 781 Check loaded MSP instance of non-null admin certs
ok 782 Check loaded MSP instance of non-null crypto suite
ok 783 Check loaded MSP instance for orgs
ok 784 Check loaded MSP instance for intermediateCerts
ok 785 Check loaded MSP instance for id
ok 786 Check loaded MSP instance of non-null root certs
ok 787 Check loaded MSP instance of non-null admin certs
ok 788 Check loaded MSP instance of non-null crypto suite
ok 789 Check loaded MSP instance for orgs
ok 790 Check loaded MSP instance for intermediateCerts
ok 791 Checking if an instance of MSP exists under key "channel1"
ok 792 Testing utils.getMSPManager()
ok 793 Testing utils.removeMSPManager()
ok 794 Deserialized identity using MSP manager
ok 795 Checking MSPManager getMSP() method
#

 ** configuration testing **


ok 796 Checking that client cert was set
ok 797 Checking that client key was set
ok 798 Checking that client cert was added
ok 799 Checking that client key was added
ok 800 Checking that able to call xxxTlsClientCertAndKey methods without error
ok 801 Should not be able to instantiate a new instance of "Client" without a valid path to the configuration
ok 802 Should not be able to instantiate a new instance of "Client" without an actual configuration file
ok 803 Should not be able to instantiate a new instance of "Client" without an actual configuration file
ok 804 Should be able to instantiate a new instance of "Client" with a valid path to the configuration
ok 805 1 Should be able to instantiate a new instance of "Channel" with the definition in the network configuration
ok 806 Should not be able to instantiate a new instance of "Channel" with a bad channel
ok 807 Should not be able to instantiate a new instance of a certificate authority until a crypto suite is assigned
ok 808  org should be Org1
ok 809  org should be Org2
ok 810  Check to see if we got the right event hub for org2 by default
ok 811  Check to see if we got the right event hub for org1 by specifically asking for org1
ok 812  Check to see if we got the right peer for org2 by default
ok 813  Check to see if we got the right peer for org1 by specifically asking for org1
ok 814  Check to see if we got the right orderer for mychannel2
ok 815  check to see if we can get the wallet name from the client config
ok 816  check to see if we can get the mspid of the current clients organization
ok 817  Check to see if we got the right peer for org2 that is endorsing and on the channel
ok 818 Check to see that we got 1 peer
ok 819  Check to see if we got the right peer for org1 that is endorsing and on the channel
ok 820  Check to see that we got no peers
ok 821  Check to see that we got 1 peer
ok 822  Check to see if we got the right peer for org1 that is endorsing and on the channel
ok 823  Check to see that we got 3 peers for Org1
ok 824  Check to see that we got 2 peers for Org2 on "mychannel3"
ok 825  Check to see that we got 1 peer for Org2
ok 826  Check to see that we got 1 peers for Org2 on "mychannel3"
ok 827 check that existing settings are still there
ok 828 check that endorser timeout was added
ok 829 check that orderer timeout was added
ok 830 check that eventHub timeout was added
ok 831 check that eventReg timeout was added
ok 832 check that timeout did not change
ok 833 check that timeout did not change
ok 834  check that we get this peer endorser timeout set
ok 835  check that we get this orderer timeout set
ok 836  check that we get this eventHub timeout set
ok 837 Successfully got the first channel without specifying the name
ok 838 Successfully got the certificate_authority
ok 839 2 Should be able to run a number of test without error
ok 840 Check for Channel not found for name undefined.
ok 841  check to see that the peer has been added to the channel
ok 842  check to see that the peer has been added to the channel
ok 843 3 Should be able to instantiate a new instance of "Channel" with the definition in the network configuration
ok 844 Should be able to instantiate a new instance of "Channel" with blank definition in the network configuration
ok 845 Check for Network configuration is missing this client's organization and certificate authority
ok 846 Channel should be named
ok 847 Should be able to instantiate a new instance of "Channel" with an empty channel definition in the network configuration
ok 848 Channel should be named
ok 849 Successfully got an orderer
ok 850 Orderer should be named
ok 851 Should be able to instantiate a new instance of "Channel" with only orderer definition in the network configuration
ok 852 Channel should be named
ok 853 Peers should be empty
ok 854 Successfully got an orderer
ok 855 Should be able to instantiate a new instance of "Channel" with org that does not exist in the network configuration
ok 856 Channel should be named
ok 857 Peers should be empty
ok 858 Successfully got an orderer
ok 859 Should be able to instantiate a new instance of "Channel" with a peer in the org that does not exist in the network configuration
ok 860 Channel should be named
ok 861 Peers should be four
ok 862 Successfully got a peer
ok 863 Should be able to instantiate a new instance of "Channel" with orderer, org and peer defined in the network configuration
ok 864 targets is an array
ok 865 targets has a peer
ok 866 targets is an array
ok 867 targets has a peer
ok 868 targets is an array
ok 869 targets has a peer
ok 870 targets is an array
ok 871 targets has a peer
ok 872 Should be able to get targets for peer
ok 873 targets should be null when request targets is null
ok 874 Should return null targets when checking a null request target
ok 875 Should not be able to get targets when targets is not a peer object
ok 876 Should not be able to get targets when targets is not a peer object
ok 877 targets should be null when list is empty
ok 878 Should get a null when the target list is empty
ok 879 client config should be empty
not ok 880 client config store path should be something
  ---
    operator: equal
    expected: |-
      '/tmp/something'
    actual: |-
      'd:\\tmp\\something'
    stack: |-
      Error: client config store path should be something
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.equal (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:384:10)
          at Test.bound [as equals] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at t.doesNotThrow (d:\Work\Fabric\fabric-sdk-node\test\unit\network-config.js:516:7)
          at Test.doesNotThrow (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:530:9)
          at Test.bound [as doesNotThrow] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at d:\Work\Fabric\fabric-sdk-node\test\unit\network-config.js:502:4
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
not ok 881 client config cryptoStore store path should be something relative
  ---
    operator: fail
    stack: |-
      Error: client config cryptoStore store path should be something relative
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at t.doesNotThrow (d:\Work\Fabric\fabric-sdk-node\test\unit\network-config.js:520:8)
          at Test.doesNotThrow (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:530:9)
          at Test.bound [as doesNotThrow] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at d:\Work\Fabric\fabric-sdk-node\test\unit\network-config.js:502:4
          at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
          at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
          at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
          at runCallback (timers.js:789:20)
          at tryOnImmediate (timers.js:751:5)
          at processImmediate [as _immediateCallback] (timers.js:722:5)
  ...
ok 882 client config store path should be something
ok 883 client config cryptoStore store path should be something
ok 884 Should not get an error when working with credentialStore settings
ok 885 organizations is an array
ok 886 organizations has a organization
ok 887 check the ca name
ok 888 Check that there are no event hubs
ok 889 check the ca name
ok 890 Should be able to get organizations
ok 891 targets is an array
ok 892 targets has a peer
ok 893 Should have two targets in the list
ok 894 Should be able to get targets for channel
ok 895 Should get an error when the role is bad
ok 896 Should have one target in the list
ok 897 Successfully got the correct target result for finding a default ledger query
ok 898 Successfully got the correct target result for finding a default ledger query
ok 899 Successfully got the correct target result for finding a string target for ledger query
ok 900 Successfully got the correct target result for finding a string target
ok 901 Successfully got the correct target result for should get back the same target if a good peer
ok 902 Successfully got the correct target result for should get back the same target if a good peer
ok 903 Successfully got the correct target result for finding a default ledger query without networkconfig
ok 904 Successfully got the correct target result for finding a default targets without networkconfig
ok 905 Should be able to run channel target methods
ok 906 Should get an error back when no targets are available
ok 907 Should get an error back when passing an array
ok 908 Should get an error back when passing a bad name
ok 909 Should get an error when the request orderer name is not found
ok 910 Should get an error when the request orderer is not a valid object
ok 911 Should get an error when the request orderer is not defined and the channel does not have any orderers
ok 912 orderer has a orderer
ok 913 orderer has a orderer
ok 914 orderer has a orderer
ok 915 orderer has a orderer
ok 916 Should be able to get orderer
ok 917 Should be able to load additional configurations
ok 918 check name
ok 919 check mspid
ok 920 check getPeers
ok 921 check getPeers
# Organization : {name : name, mspid : mspid, peers : [peer,], event hubs : [], certificateAuthorities : [ca,]}
ok 922 Should be able to run all methods of Organization
ok 923 check name
ok 924 check caname
ok 925 check url
ok 926 check connection options
ok 927 check tlscert
ok 928 check registrar
# CertificateAuthority : {name : name, url : url}
ok 929 Should be able to run all methods of CertificateAuthority
ok 930 Should get an error No network configuration has been loaded
ok 931 Should get an error Invalid parameter. Must have a valid private key.
ok 932 Should get an error Invalid parameter. Must have a valid certificate.
ok 933 Should get an error Invalid parameter. Must have a valid mspid.
ok 934 Should get an error No identity has been assigned to this client
ok 935 Successfully loaded a network configuration
ok 936 Should be able to try to load an admin from the config
ok 937 Should be able to load an additional config ...this one has the client section
ok 938 Should be able to try to load an admin from the config
ok 939 Successfully loaded a network configuration
ok 940 Should be able to load an additional config ...this one has the client section
ok 941 Successfully loaded a network configuration
ok 942 Should be able to load an additional config ...this one has the client section
ok 943 Successfully loaded a network configuration
ok 944 Should be able to load an additional config ...this one has the client section
ok 945 Successfully loaded a network configuration
#

 ** channel testing **


ok 946 Checking for No connecton profile has been loaded
ok 947 Checking for No organization name provided
ok 948 Checking for Organization definition not found for
ok 949 Checking that we got the correct peer in the list
ok 950 Checking that we got the correct peer in the list
# orderer bad address test
ok 951 Orderer did not allow setting bad URL.
# orderer missing address test
ok 952 Orderer did not allow setting a missing address.
# orderer missing data test
ok 953 Successfully found missing data: Error: Missing data - Nothing to broadcast
ok 954 pr1 Successfully caught error
ok 955 Successfully caught Client requires a network configuration loaded, stores attached, and crypto suite.
# orderer missing data deliver test
ok 956 Successfully found missing data: Error: Missing data - Nothing to deliver
# orderer unknown address test
ok 957 Should be able to load the stores from the config
ok 958 Should be able to load an admin from the config
ok 959 Should be able to get the loaded admin identity
ok 960 Should be able to load the stores from the config
ok 961 Successfully caught Missing parameter. Must have a username.
ok 962 Should be able to load the stores from the config
ok 963 Successfully caught Missing parameter. Must have a password.
ok 964 Successfully found bad deliver address!
# orderer unknown address test
ok 965 Successfully got the error call back chaincode test 4 ::Error: 14 UNAVAILABLE: Connect Failed
ok 966 Successfully found bad address!
# Orderer test
ok 967 checking the orderer setName() and close()
ok 968 checking getName on orderer
# Orderer clientCert test
ok 969 checking client certificate on orderer
#

 ** Organization - constructor set get tests **


ok 970 Test Missing name parameter
ok 971 Test Missing mspid parameter
ok 972 Test good construction
ok 973 test method getName
ok 974 test method getMspid
ok 975 test getting peers before add
ok 976 test getting peers after add
ok 977 test getting CertificateAuthorities before add
ok 978 test getting CertificateAuthorities after add
ok 979 test getting getAdminPrivateKey
ok 980 test getting getAdminPrivateKey
ok 981 test getting getAdminCert
ok 982 test getting getAdminCert
# Organization : {name : name, mspid : mspid, peers : [peer1,], event hubs : [], certificateAuthorities : [ca1,]}
ok 983 Successfully tested toString
#

** BasePackager tests **


ok 984 Node.isSource() should return true for valid extension ".keep"
ok 985 Node.isSource() should return true for valid extension ".keep2"
ok 986 Node.isSource() should return false for invalid extension ".keep3"
ok 987 Node.isMetadata() should return true for valid extension ".json"
ok 988 Node.isMetadata() should return false for invalid extension ".notjson"
ok 989 Golang.isSource() should return true for valid extension ".keep"
ok 990 Golang.isSource() should return true for valid extension ".keep2"
ok 991 Golang.isSource() should return false for invalid extension ".keep3"
ok 992 Golang.isMetadata() should return true for valid extension ".json"
ok 993 Golang.isMetadata() should return false for invalid extension ".notjson"
#

** Golang Packager tests **


ok 994 Channel.packageChaincode() should return null for dev mode
ok 995 Should throw error: Missing chaincodePath parameter
ok 996 Should return null when packaging for dev mode
ok 997 Golang.findMetadataDescriptors() pass with expected error
# Error: ENOENT: no such file or directory, lstat 'd:\somepath'
ok 998 Should throw error: ENOENT: no such file or directory
ok 999 Expected Golang.findMetadataDescriptors() to return one valid descriptor
not ok 1000 Golang.findMetadataDescriptors() should return valid descriptor name
  ---
    operator: equal
    expected: |-
      'META-INF/statedb/couchdb/indexes/index.json'
    actual: |-
      'META-INF\\statedb\\couchdb\\indexes\\index.json'
    stack: |-
      Error: Golang.findMetadataDescriptors() should return valid descriptor name
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.equal (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:384:10)
          at Test.bound [as equal] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at golang.findMetadataDescriptors.then (d:\Work\Fabric\fabric-sdk-node\test\unit\packager.js:55:5)
          at <anonymous>
          at process._tickDomainCallback (internal/process/next_tick.js:228:7)
  ...
ok 1001 Expected Node.findMetadataDescriptors() to return one valid descriptor
not ok 1002 Node.findMetadataDescriptors() should return valid descriptor name
  ---
    operator: equal
    expected: |-
      'META-INF/statedb/couchdb/indexes/index.json'
    actual: |-
      'META-INF\\statedb\\couchdb\\indexes\\index.json'
    stack: |-
      Error: Node.findMetadataDescriptors() should return valid descriptor name
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.equal (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:384:10)
          at Test.bound [as equal] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at node.findMetadataDescriptors.then (d:\Work\Fabric\fabric-sdk-node\test\unit\packager.js:39:5)
          at <anonymous>
          at process._tickDomainCallback (internal/process/next_tick.js:228:7)
  ...
not ok 1003 Failed to extract generated chaincode package. Error: ENOENT: no such file or directory, utime 'C:\Users\kiat\AppData\Local\Temp\hfc\test-deploy-copy-tar-gz\src\github.com\example_cc\example_cc.go'
  ---
    operator: fail
    stack: |-
      Error: Failed to extract generated chaincode package. Error: ENOENT: no such file or directory, utime 'C:\Users\kiat\AppData\Local\Temp\hfc\test-deploy-copy-tar-gz\src\github.com\example_cc\example_cc.go'
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at targz.decompress (d:\Work\Fabric\fabric-sdk-node\test\unit\packager.js:118:7)
          at Extract.error (d:\Work\Fabric\fabric-sdk-node\node_modules\targz\lib\targz.js:51:13)
          at emitOne (events.js:121:20)
          at Extract.emit (events.js:211:7)
          at Extract.destroy (d:\Work\Fabric\fabric-sdk-node\node_modules\tar-stream\extract.js:191:17)
          at onunlock (d:\Work\Fabric\fabric-sdk-node\node_modules\tar-stream\extract.js:69:26)
          at d:\Work\Fabric\fabric-sdk-node\node_modules\tar-fs\index.js:248:25
          at d:\Work\Fabric\fabric-sdk-node\node_modules\tar-fs\index.js:214:23
          at FSReqWrap.oncomplete (fs.js:135:15)
  ...
not ok 1004 The tar.gz file produced by Packager.package() has the "src/github.com/example_cc/example_cc.go" file
  ---
    operator: equal
    expected: true
    actual:   false
    stack: |-
      Error: The tar.gz file produced by Packager.package() has the "src/github.com/example_cc/example_cc.go" file
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.equal (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:384:10)
          at Test.bound [as equal] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at targz.decompress (d:\Work\Fabric\fabric-sdk-node\test\unit\packager.js:121:6)
          at Extract.error (d:\Work\Fabric\fabric-sdk-node\node_modules\targz\lib\targz.js:51:13)
          at emitOne (events.js:121:20)
          at Extract.emit (events.js:211:7)
          at Extract.destroy (d:\Work\Fabric\fabric-sdk-node\node_modules\tar-stream\extract.js:191:17)
          at onunlock (d:\Work\Fabric\fabric-sdk-node\node_modules\tar-stream\extract.js:69:26)
          at d:\Work\Fabric\fabric-sdk-node\node_modules\tar-fs\index.js:248:25
          at d:\Work\Fabric\fabric-sdk-node\node_modules\tar-fs\index.js:214:23
          at FSReqWrap.oncomplete (fs.js:135:15)
  ...
#

** Node.js Packager tests **


ok 1005 Should return null when packaging for dev mode
ok 1006 Should throw error: ENOENT: no such file or directory
ok 1007 The tar.gz file produced by Packager.package() has the "src/chaincode.js" file
ok 1008 The tar.gz file produced by Packager.package() has the "src/package.json" file
ok 1009 The tar.gz file produced by Packager.package() does not have the "node_modules" folder
ok 1010 The tar.gz file produced by Packager.package() has the "src/chaincode.js" file
ok 1011 The tar.gz file produced by Packager.package() has the "src/package.json" file
ok 1012 The tar.gz file produced by Packager.package() has the "src/some.other.file" file
ok 1013 The tar.gz file produced by Packager.package() has the "node_modules" folder
ok 1014 The tar.gz file produced by Packager.package() has the "META-INF/statedb/couchdb/indexes/index.json" file
# Peer test
ok 1015 checking the peer setName() and close()
ok 1016 checking getName on Peer
# Peer bad address test
ok 1017 peer did not allow setting bad URL.
# Peer missing address test
ok 1018 Peer did not allow setting a missing address.
# Peer missing data test
ok 1019 Successfully found missing data: Error: Missing proposal to send to peer
# Peer unknown address test
ok 1020 Successfully found bad address!Error: 14 UNAVAILABLE: Connect Failed
# Peer timeout test
ok 1021 Successfully got the timeoutError: REQUEST_TIMEOUT
# Peer clientCert est
ok 1022 checking client certificate on peer
#

***** READ in the genesis block *****


ok 1023  Loaded the geneisis block from the configtx tool
#

***** READ in the configtx *****


ok 1024  Loaded the channel config from the configtx tool
#

 ** Remote node tests **


 * REMOTE *

ok 1025 Check not passing any GRPC options.
ok 1026 GRPCS Options tests: new Remote should throw PEM encoded certificate is required.
ok 1027 GRPCS Options tests: new Remote should throw PEM encoded certificate is required.
ok 1028 Pass valid client certificate options.
ok 1029 GRPCS Options tests: new Remote should throw clientKey and clientCert are both required.
ok 1030 GRPCS Options tests: new Remote should throw clientKey and clientCert are both required.
ok 1031 GRPCS Options tests: new Remote should throw PEM encoded clientKey and clientCert are required.
ok 1032 GRPCS Options tests: new Remote should throw PEM encoded clientKey and clientCert are required.
ok 1033 GRPC Options tests: new Remote grpcs with opts created
ok 1034 Checking that peer.toString() reports correctly
ok 1035 GRPC Options tests: new Remote grpc with opts = null _endpoint.addr created
ok 1036 GRPC Options tests: new Remote grpc with opts = null _endpoint.creds created
ok 1037 GRPC Options tests: new Remote grpc with opts ssl-target-name-override created
ok 1038 GRPC Options tests: new Remote grpc with opts _endpoint.creds created
ok 1039 GRPC options tests: pass-through option properties

 * PEER *
ok 1040 checking that getURL works
ok 1041 Check not passing any GRPC options.
ok 1042 GRPC Options tests: new Peer grpcs with opts created
ok 1043 Checking that peer.toString() reports correctly
ok 1044 GRPC Options tests: new Peer grpc with opts = null _endpoint.addr created
ok 1045 GRPC Options tests: new Peer grpc with opts = null _endpoint.creds created
ok 1046 GRPC Options tests: new Peer grpc with opts _endpoint.addr created
ok 1047 GRPC Options tests: new Peer grpc with opts _endpoint.creds created
ok 1048 checking that getURL works
ok 1049 GRPC Options tests: new Peer http should throw InvalidProtocol: Invalid protocol: http. URLs must begin with grpc:// or grpcs://.
ok 1050 GRPCS Options tests: new Peer http should throw PEM encoded certificate is required.
ok 1051 GRPCS Options tests: new Peer http should throw PEM encoded certificate is required.
ok 1052 Pass valid client certificate options.
ok 1053 GRPCS Options tests: new Peer should throw clientKey and clientCert are both required.

 * ORDERER *
ok 1054 GRPCS Options tests: new Peer should throw clientKey and clientCert are both required.
ok 1055 Check not passing any GRPC options.
ok 1056 GRPC Options tests: new Orderer grpcs with opts created
ok 1057 Checking that orderer.toString() reports correctly
ok 1058 GRPC Options tests: new Orederer grpc with opts = null _endpoint.addr created
ok 1059 GRPC Options tests: new Orderer grpc with opts = null _endpoint.creds created
ok 1060 GRPC Options tests: new Orederer grpc with opts _endpoint.addr created
ok 1061 GRPC Options tests: new Orderer grpc with opts _endpoint.creds created
ok 1062 checking that the request timeout was set using the passed in value
ok 1063 GRPC Options tests: new Orderer should throw InvalidProtocol: Invalid protocol: http. URLs must begin with grpc:// or grpcs://.
ok 1064 GRPCS Options tests: new Orderer should throw PEM encoded certificate is required.
ok 1065 GRPCS Options tests: new Orderer should throw PEM encoded certificate is required.
ok 1066 Pass valid client certificate options.
ok 1067 GRPCS Options tests: new Orderer should throw clientKey and clientCert are both required.
ok 1068 GRPCS Options tests: new Orderer should throw clientKey and clientCert are both required.
ok 1069 Test default ssl cipher suites are properly set
ok 1070 Test overriden cipher suites
# Orderer clientCert test
ok 1071 checking the default client certificate hash
#

 ** Transaction - constructor set get tests **


ok 1072 Test Missing signer parameter
ok 1073 Successfully created a new TransactionID
ok 1074  should have false admin
ok 1075  should have true admin
#

 ** User - constructor set get tests **


ok 1076 User constructor set get tests 1: new User getName was successful
ok 1077 User constructor set get tests 1: setRoles getRoles was successful
ok 1078 Test invalid enrollment without private key
ok 1079 Test invalid enrollment with empty private key
ok 1080 Test invalid enrollment without certificate
ok 1081 Test invalid enrollment with empty certificate
ok 1082 Test invalid enrollment with no mspId
ok 1083 Test invalid enrollment with null mspId
ok 1084 Test invalid enrollment with empty mspId
ok 1085 User getCryptoSuite should initially be null
ok 1086 User constructor test 2: new User cfg getName was successful
ok 1087 User constructor test 2: new User cfg getRoles was successful
ok 1088 User class setEnrollment() test
#

 ** Logging utility tests - built-in logger **

warn: Failed to parse environment variable "HFC_LOGGING". Returned a winston logger with default configurations. Error: SyntaxError: Unexpected token ' in JSON at position 1
    at JSON.parse (<anonymous>)
    at Object.module.exports.getLogger (d:\Work\Fabric\fabric-sdk-node\fabric-client\lib\utils.js:9:6868)
    at d:\Work\Fabric\fabric-sdk-node\test\unit\logger.js:87:22
    at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
    at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
    at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
    at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
    at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)

debug: Successfully constructed a winston logger with configurations debug=console
error: [testlogger]: Test logger - error
warn: [testlogger]: Test logger - warn
info: [testlogger]: Test logger - info
debug: [testlogger]: Test logger - debug
ok 1089 Successfully caught error thrown by "utils.getLogger()" on invalid environment variable value, and returned a valid default logger
debug: Successfully constructed a winston logger with configurations debug=console
error: [testlogger]: Test logger - error
warn: [testlogger]: Test logger - warn
info: [testlogger]: Test logger - info
debug: [testlogger]: Test logger - debug
ok 1090 Successfully tested debug logger levels
warn: Failed to parse environment variable "HFC_LOGGING". Returned a winston logger with default configurations. Error: SyntaxError: Unexpected token U in JSON at position 14
    at JSON.parse (<anonymous>)
    at Object.module.exports.getLogger (d:\Work\Fabric\fabric-sdk-node\fabric-client\lib\utils.js:9:6868)
    at d:\Work\Fabric\fabric-sdk-node\test\unit\logger.js:183:19
    at Test.<anonymous> (d:\Work\Fabric\fabric-sdk-node\node_modules\tape-promise\index.es5.js:21:13)
    at Test.bound [as _cb] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
    at Test.run (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:95:10)
    at Test.bound [as run] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
    at Immediate.next (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\results.js:71:15)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
error: [testlogger]: Test logger - error
warn: [testlogger]: Test logger - warn
info: [testlogger]: Test logger - info
ok 1091 Successfully tested debug logger levels
not ok 1092 Failed to validate content in debug log file
  ---
    operator: fail
    stack: |-
      Error: Failed to validate content in debug log file
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Timeout._onTimeout (d:\Work\Fabric\fabric-sdk-node\test\unit\logger.js:198:6)
          at ontimeout (timers.js:475:11)
          at tryOnTimeout (timers.js:310:5)
          at Timer.listOnTimeout (timers.js:270:5)
  ...
not ok 1093 Failed to validate content in error log file
  ---
    operator: fail
    stack: |-
      Error: Failed to validate content in error log file
          at Test.assert [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:224:54)
          at Test.bound [as _assert] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Test.fail (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:317:10)
          at Test.bound [as fail] (d:\Work\Fabric\fabric-sdk-node\node_modules\tape\lib\test.js:76:32)
          at Timeout._onTimeout (d:\Work\Fabric\fabric-sdk-node\test\unit\logger.js:212:6)
          at ontimeout (timers.js:475:11)
          at tryOnTimeout (timers.js:310:5)
          at Timer.listOnTimeout (timers.js:270:5)
  ...
#

 ** Logging utility tests - test setting an external logger based on bunyan **

{"name":"bunyanLogger","hostname":"win10","pid":14132,"level":50,"msg":"[testlogger]: Test logger - error","time":"2018-10-03T07:12:58.596Z","v":0}
{"name":"bunyanLogger","hostname":"win10","pid":14132,"level":40,"msg":"[testlogger]: Test logger - warn","time":"2018-10-03T07:12:58.597Z","v":0}
{"name":"bunyanLogger","hostname":"win10","pid":14132,"level":30,"msg":"[testlogger]: Test logger - info","time":"2018-10-03T07:12:58.597Z","v":0}

ok 1094 Successfully tested default logger levels
#

 ** Logging utility tests - test setting an external logger based on log4js **

[2018-10-03 15:12:58.602] [ERROR] [default] - [testlogger]: Test logger - error
[2018-10-03 15:12:58.605] [WARN] [default] - [testlogger]: Test logger - warn
[2018-10-03 15:12:58.606] [INFO] [default] - [testlogger]: Test logger - info
[2018-10-03 15:12:58.607] [DEBUG] [default] - [testlogger]: Test logger - debug

ok 1095 Successfully tested default logger levels
#

 ** Logging utility tests - test setting an invalid external logger **


ok 1096 Successfully tested thrown error for an invalid logger to set on the HFC SDK

1..1096
# tests 1096
# pass  1076
# fail  20

-------------------------------|----------|----------|----------|----------|----------------|
File                           |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
-------------------------------|----------|----------|----------|----------|----------------|
 fabric-ca-client\lib\         |    65.29 |     61.4 |    55.26 |    65.29 |                |
  AffiliationService.js        |    66.67 |       70 |      100 |    66.67 |... 194,195,198 |
  FabricCAClientImpl.js        |    64.26 |    61.02 |    48.33 |    64.26 |... 924,926,929 |
  IdentityService.js           |    65.79 |       50 |    66.67 |    65.79 |... 254,255,258 |
  helper.js                    |      100 |      100 |      100 |      100 |                |
 fabric-client\lib\            |    68.43 |       63 |    72.21 |    68.56 |                |
  BaseClient.js                |     96.3 |    91.67 |      100 |     96.3 |            119 |
  BlockDecoder.js              |     71.5 |       52 |    72.22 |    71.83 |... 4,1326,1327 |
  CertificateAuthority.js      |      100 |      100 |      100 |      100 |                |
  Channel.js                   |    49.58 |     45.4 |    57.89 |    49.47 |... 1,2343,2346 |
  ChannelEventHub.js           |    62.98 |    55.46 |    65.22 |    63.34 |... 3,1294,1296 |
  Client.js                    |    73.53 |    73.02 |    78.46 |    73.56 |... 7,1930,1933 |
  Config.js                    |    91.43 |       75 |      100 |    91.43 |      65,83,100 |
  Constants.js                 |      100 |      100 |      100 |      100 |                |
  EventHub.js                  |    69.91 |    65.85 |    67.74 |    70.37 |... 821,826,833 |
  Orderer.js                   |       50 |    35.71 |     62.5 |       50 |... 285,286,289 |
  Organization.js              |    84.78 |       80 |    93.33 |    86.05 |... 122,123,126 |
  Packager.js                  |    91.67 |    91.67 |      100 |    91.67 |          57,58 |
  Peer.js                      |    84.78 |     62.5 |      100 |    84.78 |... 140,142,143 |
  Policy.js                    |    99.07 |    92.16 |      100 |    99.07 |            169 |
  Remote.js                    |     97.8 |       90 |      100 |     97.8 |        102,114 |
  TransactionID.js             |       96 |     87.5 |      100 |       96 |             48 |
  User.js                      |    83.16 |    64.29 |       80 |    83.16 |... 244,265,272 |
  api.js                       |    33.33 |      100 |        0 |    33.33 |... 171,184,198 |
  client-utils.js              |    74.79 |     64.1 |    73.33 |    74.79 |... 210,223,225 |
  hash.js                      |      100 |      100 |    94.74 |      100 |                |
  utils.js                     |    78.81 |    71.19 |    77.14 |    78.81 |... 402,461,540 |
 fabric-client\lib\impl\       |    65.15 |    59.83 |    61.46 |     65.1 |                |
  CouchDBKeyValueStore.js      |    76.71 |       60 |    93.33 |    77.46 |... 156,169,170 |
  CryptoKeyStore.js            |      100 |     87.5 |      100 |      100 |                |
  CryptoSuite_ECDSA_AES.js     |    86.08 |    71.84 |       80 |    86.08 |... 345,362,368 |
  FileKeyValueStore.js         |    91.89 |    83.33 |      100 |    91.89 |       56,57,74 |
  NetworkConfig_1_0.js         |    98.74 |    85.63 |      100 |    98.71 |    146,411,412 |
  bccsp_pkcs11.js              |    24.79 |    32.92 |     8.33 |    24.79 |... 5,1089,1090 |
 fabric-client\lib\impl\aes\   |    11.11 |        0 |        0 |    11.11 |                |
  pkcs11_key.js                |    11.11 |        0 |        0 |    11.11 |... 52,56,60,64 |
 fabric-client\lib\impl\ecdsa\ |    48.87 |    36.05 |       50 |    50.78 |                |
  key.js                       |      100 |    96.88 |      100 |      100 |                |
  pkcs11_key.js                |     9.33 |        0 |        0 |       10 |... 159,160,162 |
 fabric-client\lib\msp\        |    77.19 |    67.61 |    67.86 |    77.51 |                |
  identity.js                  |       90 |       76 |    76.92 |       90 |... ,86,104,212 |
  msp-manager.js               |    76.36 |    72.73 |    83.33 |    77.36 |... 129,130,159 |
  msp.js                       |    68.18 |    54.17 |    44.44 |    68.18 |... 137,138,180 |
 fabric-client\lib\packager\   |    90.35 |    77.27 |    76.92 |    90.35 |                |
  BasePackager.js              |    84.62 |    66.67 |       75 |    84.62 |... 150,173,191 |
  Car.js                       |       60 |      100 |        0 |       60 |          23,24 |
  Golang.js                    |      100 |      100 |      100 |      100 |                |
  Node.js                      |    96.15 |       75 |      100 |    96.15 |             82 |
-------------------------------|----------|----------|----------|----------|----------------|
All files                      |    67.67 |    61.13 |    67.58 |    67.82 |                |
-------------------------------|----------|----------|----------|----------|----------------|


=============================== Coverage summary ===============================
Statements   : 67.67% ( 4065/6007 )
Branches     : 61.13% ( 1703/2786 )
Functions    : 67.58% ( 469/694 )
Lines        : 67.82% ( 4044/5963 )
================================================================================
[15:12:59] Finished 'test-headless' after 30 s
npm ERR! Test failed.  See above for more details.
kiatng
Last edit
kiatng
Posted by kiatng to Fabric (2018-10-03 06:47)