Skip to content

Instantly share code, notes, and snippets.

@antoniovassell
Last active February 12, 2019 15:30
Show Gist options
  • Save antoniovassell/f50b6de4991a338e85345a2051ffed93 to your computer and use it in GitHub Desktop.
Save antoniovassell/f50b6de4991a338e85345a2051ffed93 to your computer and use it in GitHub Desktop.
npm test failing
antonio@xps  ~/code/test/fabric-sdk-node   release-1.4  git status
On branch release-1.4
Your branch is up to date with 'origin/release-1.4'.
nothing to commit, working tree clean
antonio@xps  ~/code/test/fabric-sdk-node   release-1.4  git pull origin release-1.4
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 12 (delta 10), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (12/12), done.
From https://github.com/hyperledger/fabric-sdk-node
* branch release-1.4 -> FETCH_HEAD
cb44392..9ea9c26 release-1.4 -> origin/release-1.4
Updating cb44392..9ea9c26
Fast-forward
fabric-client/lib/Client.js | 12 +-
fabric-client/test/Client.js | 632 ++++++++++++++++++++++++++++++++----------------------------
test/fixtures/network-discovery.json | 3 -
test/unit/channel.js | 15 +-
4 files changed, 361 insertions(+), 301 deletions(-)
antonio@xps  ~/code/test/fabric-sdk-node   release-1.4  npm test
> fabric-sdk-node@1.4.1-snapshot test /home/antonio/code/test/fabric-sdk-node
> gulp test-headless
####################################################
# debug log: /tmp/hfc/test-log/debug.log
####################################################
[11:26:23] Using gulpfile ~/code/test/fabric-sdk-node/gulpfile.js
[11:26:23] Starting 'test-headless'...
####################################################
# debug log: /tmp/hfc/test-log/debug.log
####################################################
[11:26:24] Using gulpfile ~/code/test/fabric-sdk-node/gulpfile.js
[11:26:24] Starting 'run-test-headless'...
[11:26:24] Starting 'clean-up'...
[11:26:24] Finished 'clean-up' after 892 μs
[11:26:24] Starting 'pre-test'...
[11:26:25] Finished 'pre-test' after 61 ms
[11:26:25] Starting 'ca'...
[11:26:25] gulp-debug: fabric-client/lib/api.js
[11:26:25] gulp-debug: fabric-client/lib/hash.js
[11:26:25] gulp-debug: fabric-client/lib/utils.js
[11:26:25] gulp-debug: fabric-client/lib/BaseClient.js
[11:26:25] gulp-debug: fabric-client/lib/Config.js
[11:26:25] gulp-debug: fabric-client/lib/ProtoLoader.js
[11:26:25] gulp-debug: fabric-client/lib/Remote.js
[11:26:25] gulp-debug: fabric-client/lib/User.js
[11:26:25] gulp-debug: fabric-client/lib/impl/bccsp_pkcs11.js
[11:26:25] gulp-debug: fabric-client/lib/impl/CouchDBKeyValueStore.js
[11:26:25] gulp-debug: fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js
[11:26:25] gulp-debug: fabric-client/lib/impl/aes/pkcs11_key.js
[11:26:25] gulp-debug: fabric-client/lib/impl/ecdsa/key.js
[11:26:25] gulp-debug: fabric-client/lib/impl/ecdsa/pkcs11_key.js
[11:26:25] gulp-debug: fabric-client/lib/impl/CryptoKeyStore.js
[11:26:25] gulp-debug: fabric-client/lib/impl/FileKeyValueStore.js
[11:26:25] gulp-debug: fabric-client/lib/msp/identity.js
[11:26:25] gulp-debug: fabric-client/lib/msp/msp.js
[11:26:25] gulp-debug: fabric-client/lib/protos/msp/identities.proto
[11:26:25] gulp-debug: fabric-client/lib/protos/msp/msp_config.proto
[11:26:25] gulp-debug: fabric-client/types/tsconfig.json
[11:26:25] gulp-debug: fabric-client/types/base.d.ts
[11:26:25] gulp-debug: 22 items
[11:26:25] Finished 'ca' after 22 ms
[11:26:25] Starting 'eslint'...
[11:26:25] Starting 'tslint'...
[11:26:30] Finished 'tslint' after 5.09 s
[11:26:33]
/home/antonio/code/test/fabric-sdk-node/test/unit/logger.js
28:1 warning Unexpected console statement no-console
32:2 warning Unexpected console statement no-console
63:2 warning Unexpected console statement no-console
73:2 warning Unexpected console statement no-console
190:2 warning Unexpected console statement no-console
192:2 warning Unexpected console statement no-console
237:2 warning Unexpected console statement no-console
247:2 warning Unexpected console statement no-console
258:2 warning Unexpected console statement no-console
287:2 warning Unexpected console statement no-console
✖ 10 problems (0 errors, 10 warnings)
[11:26:33] Finished 'eslint' after 8.4 s
[11:26:33] Starting 'lint'...
[11:26:33] Finished 'lint' after 13 μs
[11:26:33] Starting 'run-test-mocha'...
[11:26:33] Starting 'mocha-fabric-ca-client'...
✓ AffiliationService #constructor should set the client as passed in the argument: 0ms
✓ AffiliationService #create should throw if called with a null argument "req": 0ms
✓ AffiliationService #create should throw if called with an undefined argument "req": 0ms
✓ AffiliationService #create should throw if called without the parameter "req.name": 0ms
✓ AffiliationService #create should throw if registrar is null: 0ms
✓ AffiliationService #create should throw if registrar is undefined: 0ms
✓ AffiliationService #create should call "checkRegistrar": 2ms
AffiliationService #create should call the client POST method with the extracted url, request and sig ✓ AffiliationService #create should call the client POST method with the extracted url, request and signing identity: 2ms
✓ AffiliationService #create should call the client POST method with a "force" option if specified: 1ms
✓ AffiliationService #getOne should throw if missing required argument "affiliation": 0ms
✓ AffiliationService #getOne should throw if argument "affiliation" is not a valid string: 0ms
✓ AffiliationService #getOne should call "checkRegistrar": 1ms
AffiliationService #getOne should call the client get method with the extracted url and signing ident ✓ AffiliationService #getOne should call the client get method with the extracted url and signing identity: 0ms
✓ AffiliationService #getAll should call "checkRegistrar": 0ms
AffiliationService #getAll should call the client get method with "affiliations" and the signing iden ✓ AffiliationService #getAll should call the client get method with "affiliations" and the signing identity: 0ms
✓ AffiliationService #delete should throw if missing required argument "req": 0ms
✓ AffiliationService #delete should throw if called without the parameter "req.name": 0ms
✓ AffiliationService #delete should throw if parameter "req.name" is not a valid string: 0ms
✓ AffiliationService #delete should throw if missing required argument "registrar": 0ms
✓ AffiliationService #delete should call "checkRegistrar": 1ms
AffiliationService #delete should call the client DELETE method with an extracted "url" and the signi ✓ AffiliationService #delete should call the client DELETE method with an extracted "url" and the signing identity: 1ms
✓ AffiliationService #delete should call the client DELETE method with a "force" option if specified: 1ms
✓ AffiliationService #update should throw if missing required argument "affiliation": 0ms
✓ AffiliationService #update should throw if required argument "affiliation" is not a valid string: 0ms
✓ AffiliationService #update should throw if missing required argument "req": 0ms
✓ AffiliationService #update should throw if missing required parameter "req.name": 0ms
✓ AffiliationService #update should throw if required parameter "req.name" is not a valid string: 0ms
✓ AffiliationService #update should call "checkRegistrar": 0ms
AffiliationService #update should call the client PUT method with an extracted "url", request and the ✓ AffiliationService #update should call the client PUT method with an extracted "url", request and the signing identity: 0ms
✓ AffiliationService #update should call the client PUT method with a "force" option if specified: 1ms
✓ AffiliationService #update should pass the caname to the request if supplied: 1ms
✓ IdentityService #constructor should throw if no client passed as argument: 0ms
✓ IdentityService #constructor should set the client as passed in the argument: 0ms
✓ IdentityService #getCertificates should call "checkRegistrar": 1ms
✓ IdentityService #getCertificates should provide debug logging: 1ms
✓ IdentityService #getCertificates should provide error logging on failure: 1ms
IdentityService #getCertificates should call get with the correct url and signing identity if no requ ✓ IdentityService #getCertificates should call get with the correct url and signing identity if no request: 0ms
✓ IdentityService #getCertificates should call get with the correctly mapped request: 0ms
✓ FabricCAClient #constructor should call "_validateConnectionOpts": 1ms
✓ FabricCAClient #constructor should throw if called with invalid connection options: 0ms
✓ FabricCAClient #constructor should set all base properties of the client: 0ms
✓ FabricCAClient #constructor should set http if provided: 0ms
✓ FabricCAClient #constructor should set port if provided: 1ms
✓ FabricCAClient #constructor should set _tlsOptions if provided: 0ms
✓ FabricCAClient #constructor should default _tlsOptions.verify if not provided in opts: 0ms
✓ FabricCAClient #constructor should default _tlsOptions.trustedRoots if not provided in opts: 0ms
✓ FabricCAClient #register should throw if called with too few parameters: 0ms
✓ FabricCAClient #register should throw if called with maxEnrollements that is not a number: 0ms
✓ FabricCAClient #register should call POST with the correct method, request, and signing identity: 0ms
✓ FabricCAClient #register should call POST without the type in the request if no role provided: 0ms
FabricCAClient #register should call POST without the secret in the request if no enrollmentSecret pr ✓ FabricCAClient #register should call POST without the secret in the request if no enrollmentSecret provided: 0ms
✓ FabricCAClient #register should reject on POST failure: 1ms
✓ FabricCAClient #revoke should throw if not called with the correct number of parameters: 0ms
✓ FabricCAClient #revoke should call POST with the correct method, request, and signing identity: 1ms
✓ FabricCAClient #revoke should reject on POST failure: 0ms
✓ FabricCAClient #reenroll should throw if not called with the correct number of parameters: 1ms
✓ FabricCAClient #reenroll should call POST with the correct method, request, and signing identity: 0ms
✓ FabricCAClient #reenroll should call POST without attributes if not provided: 1ms
✓ FabricCAClient #reenroll should reject on POST failure: 0ms
✓ FabricCAClient #newIdentityService should return a new instance of IdentityService: 0ms
✓ FabricCAClient #newAffiliationService should return a new instance of AffiliationService: 1ms
✓ FabricCAClient #newCertificateService should return a new instance of CertificateService: 0ms
✓ FabricCAClient #post should call a POST request with the passed parameters: 0ms
✓ FabricCAClient #delete should call a DELETE request with the passed parameters: 1ms
✓ FabricCAClient #get should call a GET request with the passed parameters: 0ms
✓ FabricCAClient #put should call a PUT request with the passed parameters: 0ms
✓ FabricCAClient #request should reject if not passed the required parameters: 0ms
✓ FabricCAClient #request should pass a correctly formulated request options: 0ms
✓ FabricCAClient #request should return the response data on success: 1ms
✓ FabricCAClient #request should reject if no success message: 0ms
✓ FabricCAClient #request should reject if invalid jason recieved: 0ms
FabricCAClient #request should reject if no payload returned and the end data contains an error statu ✓ FabricCAClient #request should reject if no payload returned and the end data contains an error status code: 0ms
✓ FabricCAClient #generateAuthToken should sign the certificate if no request body provided: 109ms
✓ FabricCAClient #generateAuthToken should sign the certificate if a request body is provided: 0ms
FabricCAClient #generateAuthToken should return a concatention of the cert and signing in base64 stri ✓ FabricCAClient #generateAuthToken should return a concatention of the cert and signing in base64 string: 1ms
✓ FabricCAClient #enroll should throw if not provided the required number of arguments: 1ms
✓ FabricCAClient #enroll should pass a correctly formulated request options: 1ms
✓ FabricCAClient #enroll should return the enrollmentCert and caCertChain on success: 1ms
FabricCAClient #enroll should reject if no payload returned and the end data contains an error status ✓ FabricCAClient #enroll should reject if no payload returned and the end data contains an error status code: 0ms
✓ FabricCAClient #enroll should reject if no success message: 0ms
✓ FabricCAClient #enroll should reject if invalid jason recieved: 1ms
✓ FabricCAClient #enroll should reject on end point error: 0ms
✓ FabricCAClient #generateCRL should reject if not provided the required number of arguments: 0ms
✓ FabricCAClient #generateCRL should call POST with the correct method, request, and signing identity: 1ms
✓ FabricCAClient #generateCRL should reject if POST does not return success in the response body: 0ms
✓ FabricCAClient #generateCRL should reject if POST does not return result in the repsonse body: 0ms
✓ FabricCAClient #generateCRL should reject if POST throws an error: 0ms
✓ FabricCAClient #_validateConnectionOpts should throw if no protocol: 0ms
✓ FabricCAClient #_validateConnectionOpts should throw if protocol is not set to http or https: 0ms
✓ FabricCAClient #_validateConnectionOpts should throw if no hostname: 1ms
✓ FabricCAClient #_validateConnectionOpts should throw if provided port is not an integer: 0ms
✓ FabricCAClient #_validateConnectionOpts should pass with a valid input: 0ms
✓ FabricCAServices #constructor should call "parseURL" with information extracted from the URL object: 0ms
FabricCAServices #constructor should call "parseURL" with information from additional parameters id p ✓ FabricCAServices #constructor should call "parseURL" with information from additional parameters id passed URL is a string: 0ms
✓ FabricCAServices #constructor should set the crypto suite if passed: 1ms
✓ FabricCAServices #constructor should create a new crypto suite and store if none passed: 19ms
FabricCAServices #constructor should create a new FabricCAClient and store within the FabricCAService ✓ FabricCAServices #constructor should create a new FabricCAClient and store within the FabricCAServices object: 0ms
✓ FabricCAServices #getCaName should return the caName: 0ms
✓ FabricCAServices #register should throw if missing required argument "request": 0ms
✓ FabricCAServices #register should throw if required argument "request" is null: 0ms
✓ FabricCAServices #register should throw if missing required argument "request.enrollmentID": 0ms
✓ FabricCAServices #register should set max enrollments to "1" if req.maxEnrollments is undefined: 0ms
✓ FabricCAServices #register should set max enrollments to "1" if req.maxEnrollments is null: 0ms
✓ FabricCAServices #register should call "checkRegistrar": 0ms
FabricCAServices #register should call the register function on the FabricCAClient object with mapped ✓ FabricCAServices #register should call the register function on the FabricCAClient object with mapped values: 0ms
✓ FabricCAServices #enroll should throw if missing required argument "request": 0ms
✓ FabricCAServices #enroll should throw if required argument "request" is null: 0ms
✓ FabricCAServices #enroll should throw if missing required argument "request.enrollmentID": 0ms
✓ FabricCAServices #enroll should throw if missing required argument "request.enrollmentSecret": 1ms
✓ FabricCAServices #enroll should throw if request attributes is specified but not an array: 1ms
✓ FabricCAServices #enroll should throw if any request attributes are missing a name: 0ms
✓ FabricCAServices #enroll should reject on enroll failure: 2ms
✓ FabricCAServices #enroll should reject in generate CSR failure: 0ms
✓ FabricCAServices #enroll should reject in generate key failure: 0ms
FabricCAServices #enroll should set ephemeral option to false if `getCryptoSuite()._cryptoKeyStore` e ✓ FabricCAServices #enroll should set ephemeral option to false if `getCryptoSuite()._cryptoKeyStore` exists: 1ms
✓ FabricCAServices #enroll should call the enroll function on the FabricCAClient object : 0ms
✓ FabricCAServices #enroll should return a known object on success: 1ms
✓ FabricCAServices #reenroll should throw if missing required argument "currentUser": 1ms
FabricCAServices #reenroll should throw if required argument "currentUser" is not a valid User object ✓ FabricCAServices #reenroll should throw if required argument "currentUser" is not a valid User object: 0ms
✓ FabricCAServices #reenroll should throw if request attributes is specified but not an array: 0ms
✓ FabricCAServices #reenroll should throw if any request attributes are missing a name: 0ms
✓ FabricCAServices #reenroll should throw if unable to parse enrollment certificate: 1ms
✓ FabricCAServices #reenroll should reject if unable to generate key: 0ms
✓ FabricCAServices #reenroll should reject if unable to generate CSR: 1ms
✓ FabricCAServices #reenroll should rejected if reenroll fails: 1ms
FabricCAServices #reenroll should call the reenroll function on the FabricCAClient object with mapped ✓ FabricCAServices #reenroll should call the reenroll function on the FabricCAClient object with mapped parameters: 1ms
✓ FabricCAServices #reenroll should return the correct object on success: 1ms
✓ FabricCAServices #revoke should throw if missing required argument "request": 1ms
✓ FabricCAServices #revoke should throw if required argument "request" is null: 2ms
✓ FabricCAServices #revoke should throw if no enrollmentID and missing aki: 0ms
✓ FabricCAServices #revoke should throw if no enrollmentID and aki is an empty string: 0ms
✓ FabricCAServices #revoke should throw if no enrollmentID and missing serial: 0ms
✓ FabricCAServices #revoke should throw if no enrollmentID and serial is an empty string: 0ms
✓ FabricCAServices #revoke should call "checkRegistrar": 0ms
FabricCAServices #revoke should call the revoke function on the FabricCAClient object with mapped par ✓ FabricCAServices #revoke should call the revoke function on the FabricCAClient object with mapped parameters: 0ms
FabricCAServices #revoke should call the revoke function on the FabricCAClient object with conditiona ✓ FabricCAServices #revoke should call the revoke function on the FabricCAClient object with conditional reasoning: 0ms
✓ FabricCAServices #generateCRL should throw if missing required argument "request": 0ms
✓ FabricCAServices #generateCRL should throw if required argument "request" is null: 0ms
✓ FabricCAServices #generateCRL should call "checkRegistrar": 0ms
FabricCAServices #generateCRL should call the generateCRL function on the FabricCAClient object with ✓ FabricCAServices #generateCRL should call the generateCRL function on the FabricCAClient object with the mapped parameters: 0ms
FabricCAServices #newCertificateService should call the newCertificateService function on the FabricC ✓ FabricCAServices #newCertificateService should call the newCertificateService function on the FabricCAClient object : 0ms
FabricCAServices #newIdentityService should call the newIdentityService function on the FabricCAClien ✓ FabricCAServices #newIdentityService should call the newIdentityService function on the FabricCAClient object : 1ms
FabricCAServices #newAffiliationService should call the newAffiliationService function on the FabricC ✓ FabricCAServices #newAffiliationService should call the newAffiliationService function on the FabricCAClient object : 1ms
✓ FabricCAServices #toString should provide a String object showing the hostname and port: 0ms
✓ FabricCAServices #_parseURL should call the helper parseURL() method via static call: 0ms
✓ IdentityService #constructor should set the client as passed in the argument: 0ms
✓ IdentityService #create should throw if called with missing request: 0ms
✓ IdentityService #create should throw if if missing req.enrollmentID within request argument: 0ms
✓ IdentityService #create should throw if if missing req.affiliation within request argument: 0ms
✓ IdentityService #create should throw if missing required argument "registrar": 1ms
✓ IdentityService #create should throw if required argument "registrar" is an empty object: 0ms
✓ IdentityService #create should throw if required argument "registrar" is null: 0ms
✓ IdentityService #create should throw if required argument "registrar" is undefined: 0ms
✓ IdentityService #create should throw if unable to get signingIdentity from registrar: 0ms
✓ IdentityService #create should call `checkRegistrar` with the passed registrar: 1ms
IdentityService #create should call the client POST method with the correct path and signing identity ✓ IdentityService #create should call the client POST method with the correct path and signing identity: 1ms
✓ IdentityService #create should set max enrollments to 1 by default: 1ms
✓ IdentityService #create should enable override of max enrollments: 1ms
✓ IdentityService #create should return a promise containing the response secret on success: 0ms
✓ IdentityService #create should reject a promise containing an error message on failure: 0ms
✓ IdentityService #getOne should throw if missing required argument "enrollmentID": 0ms
✓ IdentityService #getOne should throw if required argument "enrollmentID" is not a valid string: 0ms
✓ IdentityService #getOne should call `checkRegistrar` with the passed registrar: 1ms
IdentityService #getOne should call the client GET method with the extracted url and signing identity ✓ IdentityService #getOne should call the client GET method with the extracted url and signing identity: 1ms
✓ IdentityService #getAll should call `checkRegistrar` with the passed registrar: 0ms
IdentityService #getAll should call the client GET method with the extracted url and signing identity ✓ IdentityService #getAll should call the client GET method with the extracted url and signing identity: 0ms
✓ IdentityService #delete should throw if missing required argument "enrollmentID": 0ms
✓ IdentityService #delete should throw if required argument "enrollmentID" is not a valid string: 0ms
✓ IdentityService #delete should call `checkRegistrar` with the passed registrar: 1ms
IdentityService #delete should call the client DELETE method with an extracted "url" and the signing ✓ IdentityService #delete should call the client DELETE method with an extracted "url" and the signing identity: 1ms
✓ IdentityService #delete should call the client DELETE method with a "force" option if specified: 0ms
✓ IdentityService #update should throw if missing required argument "enrollmentID": 0ms
✓ IdentityService #update should throw if required argument "enrollmentID" is not a valid string: 0ms
✓ IdentityService #update should call `checkRegistrar` with the passed registrar: 1ms
IdentityService #update should call the client PUT method with an extracted "url", request, and the s ✓ IdentityService #update should call the client PUT method with an extracted "url", request, and the signing identity: 0ms
✓ IdentityService #update should call the client PUT method with with extracted request options: 1ms
✓ Helper #checkRegistrar should throw if called with missing argument: 1ms
Helper #checkRegistrar should throw if called with argument that in not an instance of the class "Use ✓ Helper #checkRegistrar should throw if called with argument that in not an instance of the class "User": 0ms
✓ Helper #checkRegistrar should throw if unable to retrieve signing identity due to missing method: 0ms
✓ Helper #checkRegistrar should throw if unable to retrieve signing identity: 1ms
✓ Helper #checkRegistrar should not throw if valid registrar: 0ms
✓ Helper #getSubjectCommonName should throw if does not contain common name: 3ms
✓ Helper #getSubjectCommonName should return the common name on success: 1ms
✓ Helper #parseURL should throw if invalid protocol: 0ms
✓ Helper #parseURL should throw if not http or https protocol: 0ms
✓ Helper #parseURL should throw if not http or https protocol: 0ms
✓ Helper #parseURL should throw if no hostname: 0ms
✓ Helper #parseURL should return a URL Object on success: 1ms
188 passing (339ms)
[11:26:34] Finished 'mocha-fabric-ca-client' after 1.35 s
[11:26:34] Starting 'mocha-fabric-client'...
✓ KeyValueStore #getName should return undefined: 0ms
✓ KeyValueStore #setValue should return undefined: 0ms
✓ CryptoSuite #generateKey should return undefined: 0ms
✓ CryptoSuite #generateEphemeralKey should return undefined: 0ms
✓ CryptoSuite #deriveKey should return undefined: 0ms
✓ CryptoSuite #importKey should return undefined: 0ms
✓ CryptoSuite #getKey should return undefined: 0ms
✓ CryptoSuite #hash should return undefined: 0ms
✓ CryptoSuite #sign should return undefined: 0ms
✓ CryptoSuite #verify should return undefined: 1ms
✓ CryptoSuite #encrypt should return undefined: 0ms
✓ CryptoSuite #decrypt should return undefined: 0ms
✓ CryptoSuite #setCryptoKeyStore should throw an error if cryptoKeyStore not set: 1ms
✓ CryptoSuite #setCryptoKeyStore should throw an error if cryptoKeyStore is set: 0ms
✓ Key #getSKI should return undefined: 0ms
✓ Key #isSymmetric should return undefined: 0ms
✓ Key #isPrivate should return undefined: 0ms
✓ Key #getPublicKey should return undefined: 0ms
✓ Key #toBytes should return undefined: 1ms
✓ Hash #constructor should set the _blockSize and call reset(): 1ms
✓ Hash #hash should return the correct function: 1ms
✓ Hash #reset should return an instance of itself: 0ms
✓ Hash #update should call _hash.update and return an instance of itself: 0ms
✓ Hash #finalize should not throw: 0ms
✓ EndorsementHandler #endorse should throw when params are given: 0ms
✓ EndorsementHandler #endorse should throw when params are not given: 0ms
✓ EndorsementHandler #endorse should throw: 1ms
✓ EndorsementHandler create should throw when params are given: 0ms
✓ EndorsementHandler create should throw when params are not given: 0ms
✓ CommitHandler #commit should throw when params are given: 0ms
✓ CommitHandler #commit should throw when params are not given: 1ms
✓ CommitHandler #initialize should throw when params are given: 0ms
✓ CommitHandler create should throw when params are given: 0ms
✓ CommitHandler create should throw when params are not given: 0ms
✓ BaseClient #constructor should set `_cryptoSuite` to null: 0ms
BaseClient #BaseClient.newCryptoSuite should call `sdkUtils.newCryptoSuite` with passed parameters an ✓ BaseClient #BaseClient.newCryptoSuite should call `sdkUtils.newCryptoSuite` with passed parameters and return result: 0ms
BaseClient #BaseClient.newCryptoKeyStore should call `sdkUtils.newCryptoKeyStore` with passed paramet ✓ BaseClient #BaseClient.newCryptoKeyStore should call `sdkUtils.newCryptoKeyStore` with passed parameters and return result: 1ms
BaseClient #BaseClient.newDefaultKeyValueStore should call `sdkUtils.newKeyValueStore` with passed pa ✓ BaseClient #BaseClient.newDefaultKeyValueStore should call `sdkUtils.newKeyValueStore` with passed parameters and return result: 0ms
✓ BaseClient #BaseClient.setLogger should throw if passed logger does not implement any methods: 1ms
✓ BaseClient #BaseClient.setLogger should throw if passed logger does not implement debug: 0ms
✓ BaseClient #BaseClient.setLogger should throw if passed logger does not implement info: 1ms
✓ BaseClient #BaseClient.setLogger should throw if passed logger does not implement warn: 0ms
✓ BaseClient #BaseClient.setLogger should throw if passed logger does not implement error: 1ms
✓ BaseClient #BaseClient.setLogger should overwrite the NodeJS.global logger if it already exists: 0ms
✓ BaseClient #BaseClient.setLogger should set the NodeJS.global logger if it doesnt exist: 0ms
BaseClient #BaseClient.getConfigSetting should call `sdkUtils.getConfigSetting` with passed parameter ✓ BaseClient #BaseClient.getConfigSetting should call `sdkUtils.getConfigSetting` with passed parameters and return result: 1ms
BaseClient #getConfigSetting should call `BaseClient.getConfigSetting` with passed parameters and ret ✓ BaseClient #getConfigSetting should call `BaseClient.getConfigSetting` with passed parameters and return result: 0ms
✓ BaseClient #BaseClient.addConfigFile should call `sdkUtils.addConfigFile` with passed parameters: 0ms
BaseClient #BaseClient.setConfigSetting should call `sdkUtils.setConfigSetting` with passed parameter ✓ BaseClient #BaseClient.setConfigSetting should call `sdkUtils.setConfigSetting` with passed parameters: 0ms
BaseClient #setConfigSetting should call `BaseClient.setConfigSetting` with passed parameters and ret ✓ BaseClient #setConfigSetting should call `BaseClient.setConfigSetting` with passed parameters and return result: 0ms
BaseClient #BaseClient.getLogger should call `sdkUtils.getLogger` with passed parameters and return r ✓ BaseClient #BaseClient.getLogger should call `sdkUtils.getLogger` with passed parameters and return result: 0ms
✓ BaseClient #setCryptoSuite should set the CryptoSuite: 0ms
✓ BaseClient #getCryptoSuite should return the CryptoSuite: 0ms
BaseClient #BaseClient.normalizeX509 should call `sdkUtils.normalizeX509` with passed parameters and ✓ BaseClient #BaseClient.normalizeX509 should call `sdkUtils.normalizeX509` with passed parameters and return result: 0ms
✓ BlockDecoder #BlockDecoder.decode should throw error if not given a byte buffer: 0ms
✓ BlockDecoder #BlockDecoder.decode should parse genesis block with IMPLICIT_META type: 10ms
✓ BlockDecoder #BlockDecoder.decode should throw and log error object: 1ms
✓ BlockDecoder #BlockDecoder.decode should throw and log string: 0ms
✓ BlockDecoder #BlockDecoder.decodeBlock should throw error if block input data is missing: 0ms
✓ BlockDecoder #BlockDecoder.decodeBlock should decode Block object: 1ms
✓ BlockDecoder #BlockDecoder.decodeBlock should throw and log error object: 0ms
✓ BlockDecoder #BlockDecoder.decodeBlock should throw and log string: 0ms
✓ BlockDecoder #BlockDecoder.decodeTransaction should throw error if not given a byte buffer: 0ms
✓ BlockDecoder #BlockDecoder.decodeTransaction should generate a processed transaction: 0ms
✓ BlockDecoder #decodeBlockHeader should return a decoded block header: 0ms
✓ BlockDecoder #decodeBlockData should call _commonProto.Envelope.decode with buffer twice: 0ms
✓ BlockDecoder #decodeBlockData should call _commonProto.Envelope.decode with no proto: 0ms
✓ BlockDecoder #decodeBlockMetaData should return the correct meta data with no paramaters: 0ms
✓ BlockDecoder #decodeBlockMetaData should populate the metadata: 0ms
✓ BlockDecoder #decodeTransactionFilter should return null if metadata_bytes not given: 0ms
✓ BlockDecoder #decodeTransactionFilter should convert a not buffer to a buffer if string given: 0ms
✓ BlockDecoder #decodeTransactionFilter should add each value in metadata_bytes to transaction_filter: 0ms
BlockDecoder #decodeLastConfigSequenceNumber should return an object with value property if metadata_ ✓ BlockDecoder #decodeLastConfigSequenceNumber should return an object with value property if metadata_bytes not given: 0ms
BlockDecoder #decodeMetadataSignatures should decode the metadata signatures and call decodeMetadataV ✓ BlockDecoder #decodeMetadataSignatures should decode the metadata signatures and call decodeMetadataValueSignatures: 1ms
BlockDecoder #decodeMetadataValueSignatures should return an empty array if no meta signatures are gi ✓ BlockDecoder #decodeMetadataValueSignatures should return an empty array if no meta signatures are given: 0ms
✓ BlockDecoder #decodeMetadataValueSignatures should create return a list of signatures: 1ms
✓ BlockDecoder #decodeBlockDataEnvelope should return the decoded envelope: 1ms
✓ BlockDecoder #decodeEndorserTransaction should log an error when an error is thrown: 0ms
BlockDecoder #decodeEndorserTransaction should add actions to data when transaction with actions is g ✓ BlockDecoder #decodeEndorserTransaction should add actions to data when transaction with actions is given: 1ms
✓ BlockDecoder #decodeEndorserTransaction should return an empty object if transaction is not given: 0ms
BlockDecoder #decodeEndorserTransaction should return an empty object if transaction is given with no ✓ BlockDecoder #decodeEndorserTransaction should return an empty object if transaction is given with no actions: 0ms
✓ BlockDecoder #decodeConfigEnvelope should return the correct config envelope: 1ms
✓ BlockDecoder #decodeConfig should decode the config given: 1ms
✓ BlockDecoder #decodeConfigUpdateEnvelope should return the config update envelope: 1ms
✓ BlockDecoder #decodeConfigUpdate should create the correct config update: 1ms
✓ BlockDecoder #decodeConfigGroups should return an empty object when no proto group config given: 0ms
✓ BlockDecoder #decodeConfigGroups should call decodeConfigGroup for each group: 0ms
✓ BlockDecoder #decodeConfigGroup should return null when no proto_config_group is given: 0ms
✓ BlockDecoder #decodeConfigValues should call decodeConfigValue for each key in config_value_map: 0ms
✓ BlockDecoder #decodeConfigValue should return the correct config value for AnchorPeers: 0ms
BlockDecoder #decodeConfigValue should return an empty config for AnchorPeers when no anchor peers gi ✓ BlockDecoder #decodeConfigValue should return an empty config for AnchorPeers when no anchor peers given: 0ms
BlockDecoder #decodeConfigValue should return the correct config value for MSP when config type is 0: ✓ BlockDecoder #decodeConfigValue should return the correct config value for MSP when config type is 0: 1ms
BlockDecoder #decodeConfigValue should return the correct config value for MSP when config type is no ✓ BlockDecoder #decodeConfigValue should return the correct config value for MSP when config type is not 0: 0ms
✓ BlockDecoder #decodeConfigValue should return the correct config value for Consortium: 0ms
BlockDecoder #decodeConfigValue should return the correct config value for OrdererAddresses when no p ✓ BlockDecoder #decodeConfigValue should return the correct config value for OrdererAddresses when no proto addresses are found: 1ms
✓ BlockDecoder #decodeConfigPolicies should call deocdeConfigPolicy twice: 0ms
✓ BlockDecoder #decodeConfigPolicy should return the correct config policy if no policy is given: 0ms
✓ BlockDecoder #decodeConfigPolicy should return the correct config polict if plicy is MSP: 0ms
✓ BlockDecoder #decodeConfigPolicy should throw error if it doesnt recognise the policy type: 0ms
✓ BlockDecoder #decodeImplicitMetaPolicy should decode the implicit meta policy: 1ms
BlockDecoder #decodeSignaturePolicyEnvelope should return the correct signature policy envelope witho ✓ BlockDecoder #decodeSignaturePolicyEnvelope should return the correct signature policy envelope without identities given: 0ms
✓ BlockDecoder #decodeSignaturePolicy should throw error when unknown signature policy is given: 0ms
BlockDecoder #decodeMSPPrincipal should return the correct msp principal with role other than 0 or 1: ✓ BlockDecoder #decodeMSPPrincipal should return the correct msp principal with role other than 0 or 1: 1ms
BlockDecoder #decodeMSPPrincipal should return the correct msp principal with principal_classificatio ✓ BlockDecoder #decodeMSPPrincipal should return the correct msp principal with principal_classification ORGANISATION_UNIT: 0ms
BlockDecoder #decodeMSPPrincipal should return the correct msp principal with principal_clasification ✓ BlockDecoder #decodeMSPPrincipal should return the correct msp principal with principal_clasification IDENTITY: 0ms
✓ BlockDecoder #decodeConfigSignature should return the correct decoded config signature: 1ms
BlockDecoder #decodeSignatureHeader should decode the signature header and identity before returning ✓ BlockDecoder #decodeSignatureHeader should decode the signature header and identity before returning decoded signature header: 0ms
✓ BlockDecoder #decodeIdentity should return a decoded identity: 0ms
✓ BlockDecoder #decodeIdentity should log an error when identity decoding fails: 1ms
✓ BlockDecoder #decodeIdentity should log a string error when identity decoding fails: 0ms
✓ BlockDecoder #decodeFabricMSPConfig should decode a fabric msp config: 0ms
✓ BlockDecoder #decodeFabricOUIdentifier should return an empty array if no unit identifiers given: 0ms
✓ BlockDecoder #decodeFabricOUIdentifier should return the correct identifiers: 0ms
✓ BlockDecoder #decodeSigningIdentityInfo should return the correct identity info: 0ms
✓ BlockDecoder #decodeKeyInfo should return the correct key info: 0ms
✓ BlockDecoder #decodeKeyInfo should return an empty object if no key info bytes are given: 0ms
✓ BlockDecoder #decodeHeader should decode and return the header: 0ms
✓ BlockDecoder #decodeChannelHeader should decode and return te channel header: 4ms
✓ BlockDecoder timeStampToDate() should return null for empty timestamp: 0ms
✓ BlockDecoder timeStampToDate() should return ISO8601 string for a valid timestamp: 0ms
✓ BlockDecoder #decodeChaincodeActionPayload should return the correct chaincode action payload: 0ms
✓ BlockDecoder #decodeChaincodeProposalPayload should return the correct chaincode proposal payload: 0ms
BlockDecoder #decodeChaincodeProposalPayloadInput should return the correct chaincode proposal payloa ✓ BlockDecoder #decodeChaincodeProposalPayloadInput should return the correct chaincode proposal payload input: 0ms
✓ BlockDecoder #chaincodeTypeToString should return the correct chaincode type when one is given: 0ms
✓ BlockDecoder #chaincodeTypeToString should return an unknown chaincode type: 0ms
✓ BlockDecoder #decodeChaincodeSpec should return the correct decoded chaincode spec: 1ms
✓ BlockDecoder #decodeChaincodeInput should return the correct decoded chaincode input: 0ms
✓ BlockDecoder #decodeChaincodeEndorsedAction should return the correct endorsed action: 0ms
✓ BlockDecoder #decodeEndorsement should return the correct endorsement: 0ms
✓ BlockDecoder #decodeProposalResponsePayload should return the correct proposal response payload: 0ms
✓ BlockDecoder #decodeChaincodeAction should return the correct chaincode action payload: 0ms
✓ BlockDecoder #decodeChaincodeEvents should return the correct decoded event: 0ms
BlockDecoder #decodeChaincodeID should log and return an empty object when no proto_chaincode_id is g ✓ BlockDecoder #decodeChaincodeID should log and return an empty object when no proto_chaincode_id is given: 0ms
✓ BlockDecoder #decodeChaincodeID should return the correct decoded chaincode id: 0ms
✓ BlockDecoder #decodeReadWriteSets should return the correct read write set when data model not KV: 0ms
BlockDecoder #decodeReadWriteSets should return the correct read write set when the data model is KV: ✓ BlockDecoder #decodeReadWriteSets should return the correct read write set when the data model is KV: 0ms
✓ BlockDecoder #decodeKVRWSet should return the correct decoded kv_rw_set: 0ms
✓ BlockDecoder #decodeKVRead should return the correct kv read: 0ms
✓ BlockDecoder #decodeKVRead should return the correct kv read when proto_version not present: 0ms
✓ BlockDecoder #decodeRangeQueryInfo should return the correct range query info: 0ms
BlockDecoder #decodeRangeQueryInfo should return the correct range query info where there are no raw ✓ BlockDecoder #decodeRangeQueryInfo should return the correct range query info where there are no raw reads or merkle hashes: 0ms
✓ BlockDecoder #decodeKVWrite should return the correct kv write: 1ms
✓ BlockDecoder #decodeKVMetadataWrite should return the correct kv metadata: 0ms
✓ BlockDecoder decodeKVMetadataEntry should return the correct kv metadata entry: 0ms
✓ BlockDecoder #decodeResponse should return the correct response: 0ms
✓ BlockDecoder #decodeResponse should return nul when no proto response is given: 0ms
✓ BlockDecoder #decodeVersion should return the verson number of type int: 0ms
✓ BlockDecoder #decodeCollectionHashedRWSet should return the correct collection hashed rw set: 0ms
✓ BlockDecoder #decodeHashedRwset should return the correct hashe rw set: 0ms
✓ BlockDecoder #decodeKVReadHash should return the correct kv read hash: 1ms
✓ BlockDecoder #decodeKVReadHash should return the correct kv read hash when version is not given: 0ms
✓ BlockDecoder #decodeKVWriteHash should return the correct key hash: 0ms
✓ BlockDecoder #decodeKVMetadataWriteHash should return the correct kv metadata write hash: 0ms
✓ BlockDecoder #HeaderType.convertToString should log an error: 0ms
✓ BlockDecoder #HeaderType.convertToString should return the correct type: 0ms
✓ BlockDecoder #HeaderType.decodePayloadBasedOnType should call decodeConfigEnvelope: 0ms
✓ BlockDecoder #HeaderType.decodePayloadBasedOnType should call decodeConfigUpdateEnvelope: 0ms
✓ BlockDecoder #HeaderType.decodePayloadBasedOnType should call decodeEndorserTransaction: 0ms
BlockDecoder #HeaderType.decodePayloadBasedOnType should return an empty object and call Logger.debug ✓ BlockDecoder #HeaderType.decodePayloadBasedOnType should return an empty object and call Logger.debug as a default case: 0ms
✓ CertificateAuthority #constructor should throw error if no name parameter: 1ms
✓ CertificateAuthority #constructor should throw error if name parameter is null: 0ms
✓ CertificateAuthority #constructor should throw error if no url parameter: 0ms
✓ CertificateAuthority #constructor should throw error if url parameter is null: 0ms
CertificateAuthority #constructor should log and consditionally initialize all internal parameters if ✓ CertificateAuthority #constructor should log and consditionally initialize all internal parameters if caname: 0ms
CertificateAuthority #constructor should log and consditionally initialize all internal parameters if ✓ CertificateAuthority #constructor should log and consditionally initialize all internal parameters if no caname: 0ms
✓ CertificateAuthority #getName should return the object name: 0ms
✓ CertificateAuthority #getCaName should return the object caname: 0ms
✓ CertificateAuthority #getUrl should return the object url: 0ms
✓ CertificateAuthority #getConnectionOptions should return the object connection_options: 0ms
✓ CertificateAuthority #getTlsCACerts should return the object tlsCACerts: 1ms
✓ CertificateAuthority #getRegistrar should return the object registrar: 0ms
✓ CertificateAuthority #setFabricCAServices should set the object FabricCAServices: 0ms
✓ CertificateAuthority #getFabricCAServices should return the object FabricCAServices: 0ms
✓ CertificateAuthority #register should call register on the `FabricCAServices`: 0ms
✓ CertificateAuthority #enroll should call enroll on the `FabricCAServices`: 0ms
✓ CertificateAuthority #reenroll should call reenroll on the `FabricCAServices`: 0ms
✓ CertificateAuthority #revoke should call revoke on the `FabricCAServices`: 0ms
✓ CertificateAuthority #generateCRL should call generateCRL on the `FabricCAServices`: 0ms
CertificateAuthority #newCertificateService should call newCertificateService on the `FabricCAService ✓ CertificateAuthority #newCertificateService should call newCertificateService on the `FabricCAServices`: 0ms
✓ CertificateAuthority #newIdentityService should call newIdentityService on the `FabricCAServices`: 0ms
CertificateAuthority #newAffiliationService should call newAffiliationService on the `FabricCAService ✓ CertificateAuthority #newAffiliationService should call newAffiliationService on the `FabricCAServices`: 0ms
✓ CertificateAuthority #toString should return a string representatino of the object: 0ms
✓ Channel #constructor throws if no name parameter: 1ms
✓ Channel #constructor throws if name parameter not a string: 0ms
✓ Channel #constructor throws if name parameters does not match channel-name-regex-checker: 0ms
✓ Channel #constructor no regex check of name parameter if configuration contains an empty object: 0ms
Channel #constructor no regex check of name parameter if no channel-name-regx-checker configuration p ✓ Channel #constructor no regex check of name parameter if no channel-name-regx-checker configuration present: 0ms
✓ Channel #constructor throws if no clientContext parameter: 0ms
✓ Channel add/remove peers new channel has no peers: 0ms
✓ Channel add/remove peers throws getting a non-existent peer: 0ms
✓ Channel add/remove peers can get added peer: 0ms
✓ Channel add/remove peers channel has only added peer: 1ms
✓ Channel add/remove peers throws getting removed peer: 1ms
✓ Channel add/remove peers channel does not have removed peer: 1ms
✓ Channel add/remove peers throws adding a duplicate peer with replace parameter unset: 1ms
✓ Channel add/remove peers allows adding a duplicate peer with replace parameter set: 0ms
✓ Channel add/remove peers sets specified roles on added peer: 0ms
✓ Channel #getPeersForOrg returns empty array for non-existent org: 0ms
✓ Channel #getPeersForOrg returns peers for org: 0ms
✓ Channel #getPeersForOrg uses org from client if none supplied: 2ms
✓ Channel add/remove orderers new channel has no orderers: 0ms
✓ Channel add/remove orderers throws getting a non-existent peer: 0ms
✓ Channel add/remove orderers can get added orderer: 1ms
✓ Channel add/remove orderers channel has only added orderer: 0ms
✓ Channel add/remove orderers throws getting removed orderer: 0ms
✓ Channel add/remove orderers channel does not have removed orderer: 0ms
✓ Channel add/remove orderers throws adding a duplicate orderer with replace parameter unset: 0ms
✓ Channel add/remove orderers allows adding a duplicate peer with replace parameter set: 0ms
✓ Channel #close calls close on all channel peers: 1ms
✓ Channel #close calls close on all orderers: 0ms
✓ Channel #getName returns the channel name: 0ms
✓ Channel #newChannelEventHub returns a channel event hub for a peer: 0ms
✓ Channel #newChannelEventHub returns a channel event hub for a named peer assigned to the channel: 0ms
✓ Channel #newChannelEventHub throws for a named peer not assigned to the channel: 1ms
✓ Channel #getChannelEventHub throws for non-string name parameter: 0ms
✓ Channel #getChannelEventHub returns a channel event hub for a named peer assigned to the channel: 0ms
✓ Channel #getChannelEventHub returns the same channel event hub on subsequent calls: 0ms
✓ Channel #getChannelEventHub throws for a peer not assigned to the channel: 0ms
✓ Channel #getChannelEventHubsForOrg returns empty results if no peers in org: 0ms
✓ Channel #getChannelEventHubsForOrg returns channel event hubs for peers in a given organization: 0ms
Channel #getChannelEventHubsForOrg returns channel event hubs for channel's orgnanization if no organ ✓ Channel #getChannelEventHubsForOrg returns channel event hubs for channel's orgnanization if no organization specified: 0ms
Channel #getChannelEventHubsForOrg does not return channel event hubs for peers that are not event so ✓ Channel #getChannelEventHubsForOrg does not return channel event hubs for peers that are not event sources: 1ms
✓ Channel organizations set/get MSP manager: 0ms
✓ Channel organizations returns empty array if no member services providers: 1ms
✓ Channel organizations returns member services provider IDs from MSP manager: 161ms
✓ Channel #toString include channel name: 1ms
✓ Channel #toString include peers: 1ms
✓ Channel #toString include orderers: 0ms
✓ Channel #compareProposalResponseResults throws if argument is not an array: 1ms
✓ Channel #compareProposalResponseResults throws if argument is an empty array: 0ms
✓ Channel #compareProposalResponseResults returns true for a single poposal response: 2ms
✓ Channel #compareProposalResponseResults returns true for matching poposal responses: 1ms
✓ Channel #compareProposalResponseResults returns false for non-matching poposal responses: 0ms
✓ Channel #compareProposalResponseResults returns false if any proposal responses are Error objects: 0ms
✓ Channel #generateUnsignedProposal throws if request is missing: 1ms
✓ Channel #generateUnsignedProposal throws if request.args is not an array: 0ms
✓ Channel #generateUnsignedProposal throws if request.chaincodeId is missing: 0ms
Channel #generateUnsignedProposal returns proposal with args array of [functionName, requestArgs...]: ✓ Channel #generateUnsignedProposal returns proposal with args array of [functionName, requestArgs...]: 6ms
Channel #generateUnsignedProposal returns a proposal with function name "invoke" if no request.fcn is ✓ Channel #generateUnsignedProposal returns a proposal with function name "invoke" if no request.fcn is missing: 1ms
✓ Channel #generateUnsignedProposal returns a proposal with request.argbytes appended to args array: 1ms
✓ Channel #generateUnsignedProposal returns a transaction ID: 1ms
✓ Channel #generateUnsignedProposal returns admin transaction ID if admin parameter is true: 1ms
✓ Channel #generateUnsignedProposal returns non-admin transaction ID if admin parameter is false: 0ms
✓ Channel #verifyProposalResponse throws if proposal_response is missing: 0ms
✓ Channel #verifyProposalResponse throws if parameter is not a ProposalResponse: 0ms
✓ Channel #verifyProposalResponse throws for unknown MSP ID in proposal response: 1ms
✓ Channel #verifyProposalResponse returns false if MSP unable to deserialize identity: 1ms
✓ Channel #verifyProposalResponse returns false if identity not valid: 0ms
✓ Channel #verifyProposalResponse returns false if signature not valid: 0ms
✓ Channel #verifyProposalResponse returns false if signature verification errors: 0ms
✓ Channel #verifyProposalResponse returns true for valid proposal response: 0ms
✓ Channel #verifyProposalResponse returns false if the proposal response is an error: 0ms
✓ Channel #generateUnsignedTransaction throws if request missing: 0ms
✓ Channel #generateUnsignedTransaction throws if request.proposalResponses is not an array: 0ms
✓ Channel #generateUnsignedTransaction throws if request.proposal missing: 0ms
✓ Channel #generateUnsignedTransaction throws if no endorsed proposal responses: 0ms
✓ Channel #generateUnsignedTransaction throws if no endorsed proposal responses: 0ms
Channel #generateUnsignedTransaction returns a transaction payload containing first input proposal re ✓ Channel #generateUnsignedTransaction returns a transaction payload containing first input proposal response payload: 0ms
✓ Channel #sendSignedProposal returns results of calling sendProposal() on peers as an array: 1ms
✓ Channel #initialize throws if no request parameter and no peer added: 8ms
✓ Channel #initialize successful with peer added and no request parameter: 4ms
Channel #initialize successful with two peers added and peer name supplied as request target paramete ✓ Channel #initialize successful with two peers added and peer name supplied as request target parameter: 2ms
✓ Channel #initialize successful with no peer added and a Peer supplied as request target parameter: 1ms
Channel #initialize successful with no peer added and a ChannelPeer supplied as request target parame ✓ Channel #initialize successful with no peer added and a ChannelPeer supplied as request target parameter: 2ms
✓ Channel #initialize throws if specified target peer name does not exist: 1ms
✓ Channel #initialize throws if specified target peer is not a Peer or ChannelPeer: 1ms
✓ Channel #initialize specified endorsement handler is initialized: 2ms
✓ Channel #initialize specified commit handler is initialized: 2ms
✓ Channel #initialize successful with no commit handler specified and no commit handler configuration: 2ms
✓ Channel #initialize configuration update: 0ms
✓ Channel #refresh should call initialize and return the result: 0ms
✓ Channel #refresh should log if Channel._initialize throws an error: 0ms
✓ Channel #_buildOrdererName should match an existing orderer: 1ms
Channel #_buildOrdererName should throw an error if orderer is not found and there is missing informa ✓ Channel #_buildOrdererName should throw an error if orderer is not found and there is missing information: 1ms
✓ Channel #_buildOrdererName should add a new orderer if all information is available: 1ms
✓ Channel #_buildPeerName should match an existing peer: 1ms
✓ Channel #_buildPeerName should throw an error if peer is not found and there is information missing: 1ms
✓ Channel #_buildPeerName should add a new peer if all information is available: 1ms
✓ Channel #_buildOptions should return the build options: 9ms
✓ Channel #_buildTlsRootCerts should return the root certs if they are in the msp: 1ms
✓ Channel #_buildTlsRootCerts should return the intermediate certs if they are in the msp: 0ms
✓ Channel #_buildTlsRootCerts should return both root and intermediate certs if they are in the msp: 0ms
✓ Channel #_merge_hints should return false if no hints are given: 0ms
✓ Channel #_merge_hints should convert non-array hints to arrays and add it to the hints: 0ms
✓ Channel #_merge_hints should should return true if hint exists: 0ms
✓ Channel #buildDiscoveryInterest should return a discovery interest and call _buildDiscoveryInterest: 0ms
✓ Channel #_buildDiscoveryChaincodeCall should throw an error if name is not a string: 0ms
✓ Channel #_buildDiscoveryChaincodeCall should throw an error if collection_names is not an array: 1ms
Channel #_buildDiscoveryChaincodeCall should throw an error if collection_names contains non-string v ✓ Channel #_buildDiscoveryChaincodeCall should throw an error if collection_names contains non-string values: 0ms
Channel #_buildDiscoveryChaincodeCall should return the chaincode calls if collection_names are not s ✓ Channel #_buildDiscoveryChaincodeCall should return the chaincode calls if collection_names are not set: 0ms
Channel #_buildDiscoveryChaincodeCall should return the chaincode call when correct parameters are gi ✓ Channel #_buildDiscoveryChaincodeCall should return the chaincode call when correct parameters are given: 0ms
✓ Channel #sendInstantiateProposal should call _sendChaincodeProposal: 1ms
✓ Channel #sendUpgradeProposal should call _sendChaincodeProposal: 0ms
✓ Channel #queryByChaincode uses supplied transaction ID: 3ms
✓ Channel #queryByChaincode creates a transaction ID if none supplied: 2ms
✓ Channel #queryByChaincode returns valid peer response payloads: 2ms
✓ Channel #queryByChaincode returns error peer response messages: 1ms
✓ Channel #queryByChaincode returns error peer response without message: 5ms
✓ Channel #queryByChaincode returns peer invocation failures: 2ms
✓ Channel #queryByChaincode throws if no request supplied: 0ms
✓ ChannelPeer #constructor should throw an error if the channel parameter is missing: 0ms
✓ ChannelPeer #constructor should throw an error if the peer parameter is missing: 2ms
✓ ChannelPeer #constructor should set the correct class properties: 2ms
✓ ChannelPeer #constructor should set the correct roles: 6ms
✓ ChannelPeer #close should close the peer connection: 0ms
✓ ChannelPeer #close should close the connection to the event hub: 0ms
✓ ChannelPeer #getMspId should return the mspid: 0ms
✓ ChannelPeer #getName should return the name: 0ms
✓ ChannelPeer #getUrl should return the peer url: 0ms
✓ ChannelPeer #setRole should set a role: 1ms
✓ ChannelPeer #isInRole should throw an error if no role is given: 1ms
✓ ChannelPeer #isInRole should return true if role not found: 0ms
✓ ChannelPeer #isInRole should return the role if found: 0ms
✓ ChannelPeer #isInOrg should return true if no mspId is given: 0ms
✓ ChannelPeer #isInOrg should check if the mspid matches: 0ms
✓ ChannelPeer #getChannelEventHub should return the event hub if it is set: 0ms
✓ ChannelPeer #getChannelEventHub should create a new event hub if one is not set: 1ms
✓ ChannelPeer #getPeer should return the peer: 0ms
✓ ChannelPeer #sendProposal should return the proposal request: 0ms
✓ ChannelPeer #sendDiscovery should return the discovery request: 0ms
✓ ChannelPeer #toString should call peer.toString: 0ms
✓ ChannelEventHub #constructor should log on entry: 0ms
✓ ChannelEventHub #constructor should call _setReplayDefaults: 0ms
✓ ChannelEventHub #constructor should throw if channel arg isnt given: 0ms
✓ ChannelEventHub #constructor should throw if peer argument isnt given: 1ms
✓ ChannelEventHub #getName should call and return _peer.getName(): 0ms
✓ ChannelEventHub #getPeerAddr should return null if peer is not set: 0ms
✓ ChannelEventHub #getPeerAddr should return the addr if peer is set: 0ms
✓ ChannelEventHub #lastBlockNumber should throw an error if a block has not been seen: 0ms
✓ ChannelEventHub #lastBlockNumber should return the last block seen: 0ms
✓ ChannelEventHub #_checkAllowRegistrations should throw an error if registration is not allowed: 0ms
✓ ChannelEventHub #_checkAllowRegistrations should not throw an error if registration is allowed: 1ms
✓ ChannelEventHub #isconnected should return the value of the _connected property: 0ms
✓ ChannelEventHub #connect should throw an error if required fields are not instantiated: 1ms
✓ ChannelEventHub #connect should call the correct logs on exit: 0ms
✓ ChannelEventHub #connect should validate a signed event: 0ms
✓ ChannelEventHub #connect should not validate a null signed event: 1ms
✓ ChannelEventHub #connect should log when options are null: 0ms
✓ ChannelEventHub #connect should log when options are undefined: 1ms
✓ ChannelEventHub #connect should call _connect: 0ms
✓ ChannelEventHub #_connect should log on entry: 1ms
✓ ChannelEventHub #_connect should log if _connect_running: 0ms
✓ ChannelEventHub #_connect should log if _connected: 0ms
✓ ChannelEventHub #_connect should throw an error if there is no peer: 0ms
✓ ChannelEventHub #_connect should set up the class before setting up the disconnect timeout: 1ms
✓ ChannelEventHub #_connect should log and call _disconnect on timeout: 0ms
✓ ChannelEventHub #_connect should generate the correct config and log it: 1ms
✓ ChannelEventHub #_connect should call stream on data and log about an unknown response: 2ms
ChannelEventHub #_connect should call stream on data log about an success response and not success st ✓ ChannelEventHub #_connect should call stream on data log about an success response and not success status: 1ms
ChannelEventHub #_connect should call stream on data log about an success response and success status ✓ ChannelEventHub #_connect should call stream on data log about an success response and success status if _ending_block_seen and _last_block_seen set: 1ms
ChannelEventHub #_connect should call stream on data log about an success response and success status ✓ ChannelEventHub #_connect should call stream on data log about an success response and success status if _ending_block_seen and _last_block_seen not set: 0ms
✓ ChannelEventHub #_connect should log if the stream id and _current stream are not the same: 1ms
✓ ChannelEventHub #_connect should log debug and errors if connected and an error is detected: 1ms
✓ ChannelEventHub #_connect should log debug and errors if connected and a string error is detected: 1ms
✓ ChannelEventHub #_connect should create a block and update _last_seen_block: 2ms
✓ ChannelEventHub #_connect should parse a filtered block and update _last_seen_block: 1ms
✓ ChannelEventHub #_connect should call disconnect if called with instance of Error: 0ms
✓ ChannelEventHub #disconnect should call a debug log: 0ms
✓ ChannelEventHub #disconnect should log, call _disconnect and change disconnect_running to false: 1ms
✓ ChannelEventHub #disconnect handles errors thrown by block event listeners: 1ms
✓ ChannelEventHub #disconnect handles errors throw by tx event listeners: 1ms
✓ ChannelEventHub #close should be an alias of disconnect: 0ms
✓ ChannelEventHub #_disconnect should log and call the correct functions: 1ms
✓ ChannelEventHub #_shutdown should cancel and end the stream: 0ms
✓ ChannelEventHub #_shutdown should close the event client: 1ms
✓ ChannelEventHub #_sendRegistration should call _stream.write with the correct params: 1ms
✓ ChannelEventHub #_validateSignedEvent should log entry: 0ms
✓ ChannelEventHub #_validateSignedEvent should log exit: 0ms
✓ ChannelEventHub #_validateSignedEvent should throw an error if no signature is given: 0ms
✓ ChannelEventHub #_validateSignedEvent should throw an error if no payload is given: 0ms
✓ ChannelEventHub #_validateSignedEvent should return the correct event: 1ms
✓ ChannelEventHub #_sendSignedRegistration should log on entry: 0ms
✓ ChannelEventHub #_sendSignedRegistration should call _stream.write: 1ms
✓ ChannelEventHub #generateUnsignedRegistration should log on entry: 0ms
✓ ChannelEventHub #generateUnsignedRegistration should throw if options arg is not given: 0ms
✓ ChannelEventHub #generateUnsignedRegistration should throw if no txId arg is given: 0ms
✓ ChannelEventHub #generateUnsignedRegistration should throw if no txId arg is given: 0ms
✓ ChannelEventHub #generateUnsignedRegistration should throw if no certificate arg is given: 0ms
✓ ChannelEventHub #generateUnsignedRegistration should throw if no mspId arg is given: 0ms
ChannelEventHub #generateUnsignedRegistration should create a new Identity and TransactionID if they ✓ ChannelEventHub #generateUnsignedRegistration should create a new Identity and TransactionID if they arent given: 0ms
ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero bloc ✓ ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero blocks: 1ms
ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero bloc ✓ ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero blocks given identity and txId: 0ms
ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero bloc ✓ ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero blocks given identity and txId: 1ms
ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero bloc ✓ ChannelEventHub #generateUnsignedRegistration should return the seek payload with more than zero blocks given identity and txId: 1ms
ChannelEventHub #generateUnsignedRegistration should return the seek payload with zero blocks given i ✓ ChannelEventHub #generateUnsignedRegistration should return the seek payload with zero blocks given identity and txId: 1ms
ChannelEventHub #generateUnsignedRegistration should return the seek payload with zero blocks given i ✓ ChannelEventHub #generateUnsignedRegistration should return the seek payload with zero blocks given identity and txId: 0ms
✓ ChannelEventHub #_closeAllCallbacks should log on entry and exit: 0ms
✓ ChannelEventHub #_closeAllCallbacks should log if no onError method in block registration: 0ms
ChannelEventHub #_closeAllCallbacks should log and call onError if onError method in block registrati ✓ ChannelEventHub #_closeAllCallbacks should log and call onError if onError method in block registration: 0ms
✓ ChannelEventHub #_closeAllCallbacks should log if no onError method on transaction registration: 0ms
ChannelEventHub #_closeAllCallbacks should log and call onError if onError method in block registrati ✓ ChannelEventHub #_closeAllCallbacks should log and call onError if onError method in block registration: 0ms
✓ ChannelEventHub #_closeAllCallbacks should log for each chaincode registration: 0ms
✓ ChannelEventHub #_closeAllCallbacks should call onError if onError method in chaincode registration: 0ms
✓ ChannelEventHub #_checkReplay should log on entry and exit: 0ms
✓ ChannelEventHub #_checkReplay should throw if there is a problem with the startBlock parameter: 0ms
✓ ChannelEventHub #_checkReplay should return 1 when startBlock is set: 0ms
ChannelEventHub #_checkReplay should throw an error if there is a problem with the endBlock parameter ✓ ChannelEventHub #_checkReplay should throw an error if there is a problem with the endBlock parameter: 0ms
✓ ChannelEventHub #_checkReplay should throw an error if startBlock is greater than endBlock: 1ms
ChannelEventHub #_checkReplay should throw an error if startBlock given and _haveRegistrations is tru ✓ ChannelEventHub #_checkReplay should throw an error if startBlock given and _haveRegistrations is true: 0ms
ChannelEventHub #_checkReplay should throw an error if endBlock given and _haveRegistrations is true: ✓ ChannelEventHub #_checkReplay should throw an error if endBlock given and _haveRegistrations is true: 0ms
✓ ChannelEventHub #_checkReplay should throw an error if startBlock and _connected: 0ms
✓ ChannelEventHub #_checkReplay should throw an error if endBlock and _connected: 0ms
✓ ChannelEventHub #_checkReplay should return 2 if endBlock is set: 0ms
✓ ChannelEventHub #_checkReplay should return 2 if endBlock is set to newest: 0ms
✓ ChannelEventHub #_haveRegistrations should return true if count is greater than 0: 0ms
✓ ChannelEventHub #_haveRegistrations should return false if count is less than 1: 0ms
✓ ChannelEventHub #_checkConnection should log on entry and exit: 0ms
✓ ChannelEventHub #_checkConnection should log if not connected and connect is not running: 0ms
✓ ChannelEventHub #_checkConnection should check stream and log if connected: 1ms
✓ ChannelEventHub #_checkConnection should check stream and log if connect running: 0ms
ChannelEventHub #_checkConnection should call _diconnect and throw an error if not ready and connect ✓ ChannelEventHub #_checkConnection should call _diconnect and throw an error if not ready and connect is not running: 0ms
ChannelEventHub #checkConnection should log and call isStreamReady twice if force_reconnect is false: ✓ ChannelEventHub #checkConnection should log and call isStreamReady twice if force_reconnect is false: 1ms
ChannelEventHub #checkConnection should throw a string and call _disconnect if _stream is not set but ✓ ChannelEventHub #checkConnection should throw a string and call _disconnect if _stream is not set but force_reconnect is: 0ms
ChannelEventHub #checkConnection should throw a string and call _disconnect if _stream is not set but ✓ ChannelEventHub #checkConnection should throw a string and call _disconnect if _stream is not set but force_reconnect is: 0ms
✓ ChannelEventHub #checkConnection should call resume if connection is paused: 0ms
✓ ChannelEventHub #checkConnection should call connect if not ready: 0ms
✓ ChannelEventHub #checkConnection should do nothing if not paused and ready: 1ms
✓ ChannelEventHub #checkConnection should call _connect if _stream not set: 0ms
✓ ChannelEventHub #registerChaincodeEvent should throw if ccid is missing: 0ms
✓ ChannelEventHub #registerChaincodeEvent should throw if eventname is missing: 0ms
✓ ChannelEventHub #registerChaincodeEvent should throw if onEvent is missing: 0ms
ChannelEventHub #registerChaincodeEvent should call _checkAllowRegistrations, _checkReplay and _check ✓ ChannelEventHub #registerChaincodeEvent should call _checkAllowRegistrations, _checkReplay and _checkConnection: 0ms
✓ ChannelEventHub #registerChaincodeEvent should use an existing cbtable: 0ms
✓ ChannelEventHub #unregisterChaincodeEvent should log on entry: 0ms
✓ ChannelEventHub #unregisterChaincodeEvent should throw an error if listen_handle is not given: 0ms
ChannelEventHub #unregisterChaincodeEvent should throw an error if chaincodeRegistrant is not found a ✓ ChannelEventHub #unregisterChaincodeEvent should throw an error if chaincodeRegistrant is not found and throw is true: 0ms
ChannelEventHub #unregisterChaincodeEvent should call delete if chaincodeRegistrant is not found and ✓ ChannelEventHub #unregisterChaincodeEvent should call delete if chaincodeRegistrant is not found and throw is false: 0ms
ChannelEventHub #unregisterChaincodeEvent should call not delete the _chaincodeRegistrants entry if t ✓ ChannelEventHub #unregisterChaincodeEvent should call not delete the _chaincodeRegistrants entry if the set has length > 0: 0ms
✓ ChannelEventHub #unregisterChaincodeEvent should not call delete if cbtable not found: 0ms
✓ ChannelEventHub #registerBlockEvent should throw an error if onEvent is missing: 0ms
✓ ChannelEventHub #registerBlockEvent should call _checkAllowRegistrations and _checkConnection: 0ms
✓ ChannelEventHub #registerBlockEvent shold change default_disconnect to true: 0ms
ChannelEventHub #registerBlockEvent should set _start_stop_registration, unregister_action callback a ✓ ChannelEventHub #registerBlockEvent should set _start_stop_registration, unregister_action callback and call unregisterBlockEvent: 1ms
✓ ChannelEventHub #unregisterBlockEvent should log on entry: 0ms
ChannelEventHub #unregisterBlockEvent should delete the registration from the _transactionRegistratio ✓ ChannelEventHub #unregisterBlockEvent should delete the registration from the _transactionRegistrations object: 0ms
ChannelEventHub #unregisterBlockEvent should throw if no transaction for txid found and throwError is ✓ ChannelEventHub #unregisterBlockEvent should throw if no transaction for txid found and throwError is true: 0ms
ChannelEventHub #unregisterBlockEvent should not throw if no transaction for txid found and throwErro ✓ ChannelEventHub #unregisterBlockEvent should not throw if no transaction for txid found and throwError is false: 0ms
✓ ChannelEventHub #registerTxEvent should log on entry: 0ms
✓ ChannelEventHub #registerTxEvent should throw if txid is missing: 1ms
✓ ChannelEventHub #registerTxEvent should throw if txid is not a string: 0ms
✓ ChannelEventHub #registerTxEvent should throw if onEvent is missing: 0ms
✓ ChannelEventHub #registerTxEvent should throw if transactionId has already been registered: 0ms
✓ ChannelEventHub #registerTxEvent should all _CheckAllowRegistrations and _checkReplay: 0ms
ChannelEventHub #registerTxEvent should cahnge txid to lowercase change default_unregister to false a ✓ ChannelEventHub #registerTxEvent should cahnge txid to lowercase change default_unregister to false and change default_disconnect to true: 0ms
✓ ChannelEventHub #registerTxEvent should set the unregister_action: 0ms
✓ ChannelEventHub #unregisterTxEvent should log on entry: 0ms
ChannelEventHub #unregisterTxEvent should delete the registration from the _transactionRegistrations ✓ ChannelEventHub #unregisterTxEvent should delete the registration from the _transactionRegistrations object: 0ms
ChannelEventHub #unregisterTxEvent should throw if no transaction for txid found and throwError is tr ✓ ChannelEventHub #unregisterTxEvent should throw if no transaction for txid found and throwError is true: 0ms
ChannelEventHub #unregisterTxEvent should not throw if no transaction for txid found and throwError i ✓ ChannelEventHub #unregisterTxEvent should not throw if no transaction for txid found and throwError is false: 0ms
ChannelEventHub #_processBlockEvents should return null and do nothing if there are no _blockRegistra ✓ ChannelEventHub #_processBlockEvents should return null and do nothing if there are no _blockRegistrations: 0ms
✓ ChannelEventHub #_processBlockEvents should call onEvent for each block: 1ms
✓ ChannelEventHub #_processBlockEvents handles errors thrown from block listeners: 0ms
✓ ChannelEventHub #_processTxEvents should log if there are no transaction registrations: 0ms
✓ ChannelEventHub #_processTxEvents should log if given a block number: 0ms
✓ ChannelEventHub #_processTxEvents should call _checkTransactionId for each filtered transaction: 0ms
✓ ChannelEventHub #_processTxEvents should log if not given a block number: 0ms
✓ ChannelEventHub #_processTxEvents should call _checkTransaction id for each data item: 1ms
✓ ChannelEventHub #_processTxEvents handles errors thrown from tx event listeners: 1ms
✓ ChannelEventHub #_checkTransactionId should not call _callTransactionListener if trans_reg is null: 0ms
✓ ChannelEventHub #_checkTransactionId should call _callTransactionListener if trans_reg is not null: 0ms
ChannelEventHub #_checkTransactionId should call _callTransactionListener if all_trans_reg is not nul ✓ ChannelEventHub #_checkTransactionId should call _callTransactionListener if all_trans_reg is not null: 0ms
✓ ChannelEventHub #_callTransactionListener should log on entry: 1ms
✓ ChannelEventHub #_callTransactionListener shold call convertValidationCode and trans_reg.onEvent: 0ms
✓ ChannelEventHub #_callTransactionListener should call unregisterTxEvent and log: 0ms
✓ ChannelEventHub #_callTransactionListener should call unregisterTxEvent and log: 0ms
ChannelEventHub #_processChaincodeEvents should log and return if no chaincodeRegistrants are present ✓ ChannelEventHub #_processChaincodeEvents should log and return if no chaincodeRegistrants are present: 0ms
✓ ChannelEventHub #_processChaincodeEvents should do nothing if there are no filtered_transactions: 0ms
ChannelEventHub #_processChaincodeEvents should do nothing if there are no transaction_actions on a f ✓ ChannelEventHub #_processChaincodeEvents should do nothing if there are no transaction_actions on a filtered transaction: 0ms
ChannelEventHub #_processChaincodeEvents should do nothing if there are no chaincode_actions on a fil ✓ ChannelEventHub #_processChaincodeEvents should do nothing if there are no chaincode_actions on a filtered transaction_actions: 0ms
ChannelEventHub #_processChaincodeEvents should call _callChaincodeListener for every chaincode_actio ✓ ChannelEventHub #_processChaincodeEvents should call _callChaincodeListener for every chaincode_action: 0ms
✓ ChannelEventHub #_processChaincodeEvents should log for for each data in the block: 1ms
ChannelEventHub #_processChaincodeEvents should log if an error is thrown when unmarshalling the tran ✓ ChannelEventHub #_processChaincodeEvents should log if an error is thrown when unmarshalling the transaction: 0ms
✓ ChannelEventHub #_processChaincodeEvents should log if block is not of type endorser: 0ms
✓ ChannelEventHub #_processChaincodeEvents should log if there are no transactions: 0ms
✓ ChannelEventHub #_processChaincodeEvents should log if there are no transaction actions: 0ms
✓ ChannelEventHub #_processChaincodeEvents should log and call _callChaincodeListener: 1ms
✓ ChannelEventHub #_callChaincodeListener should log and return if chaincode registrant is not found: 0ms
✓ ChannelEventHub #_callChaincodeListener should log and call convertValidationCode: 0ms
✓ ChannelEventHub #_callChaincodeListener should log if the event name does not match the filter: 0ms
ChannelEventHub #_callChaincodeListener should delete the payload from the chaincode event if filtere ✓ ChannelEventHub #_callChaincodeListener should delete the payload from the chaincode event if filtered is true: 0ms
✓ ChannelEventHub #_callChaincodeListener should call delete if unregister is true: 1ms
✓ ChannelEventHub #_callChaincodeListener should call disconnect if disconnect is true: 0ms
✓ ChannelEventHub #_checkReplayEnd should exit without calling if _ending_block_number is null: 0ms
ChannelEventHub #_checkReplayEnd should exit if _ending_block_number is greater than _last_block_seen ✓ ChannelEventHub #_checkReplayEnd should exit if _ending_block_number is greater than _last_block_seen: 0ms
✓ ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is null: 0ms
ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is not null and unregister i ✓ ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is not null and unregister is false: 0ms
ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is not null and unregister i ✓ ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is not null and unregister is true after calling unregister_action: 0ms
ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is not null and disconnect i ✓ ChannelEventHub #_checkReplayEnd should exit if _start_stop_registration is not null and disconnect is true after calling disconnect: 0ms
✓ convertValidationCode should return the code if it is a string: 0ms
✓ convertValidationCode should retrieve the code from a list and return it: 0ms
✓ isStreamReady should return a defualt false ready status: 1ms
✓ isStreamReady should log evetyhing and return true ready status: 0ms
✓ ChaincodeRegistration #constructor should set the correct properties: 0ms
✓ EventRegistration #constructor should log if unregister is not defined: 1ms
✓ EventRegistration #constructor should set unregister if it is boolean: 0ms
EventRegistration #constructor should throw an error if unregister is not undefined, null or boolean: ✓ EventRegistration #constructor should throw an error if unregister is not undefined, null or boolean: 0ms
✓ EventRegistration #constructor should log if disconnect is not defined: 0ms
✓ EventRegistration #constructor should set disconnect if it is boolean: 0ms
EventRegistration #constructor should throw an error if disconnect is not undefined, null or boolean: ✓ EventRegistration #constructor should throw an error if disconnect is not undefined, null or boolean: 0ms
✓ EventRegistration #constructor should set the correct parameters: 0ms
✓ Client loadFromConfig should create a Client instance and call loadFromConfig: 1ms
✓ Client #loadFromConfig should get additional network config and set _network_config to it: 0ms
✓ Client #loadFromConfig should get additional network config and merge it with the existing config: 0ms
✓ Client #loadFromConfig should get additional network config and set adming and set mspid: 0ms
Client #setTlsClientCertAndKey should set clientCert, cleintKey, clientCerthash and call logger.debug ✓ Client #setTlsClientCertAndKey should set clientCert, cleintKey, clientCerthash and call logger.debug: 0ms
✓ Client #setTlsClientCertAndKey should generate a new ephemeral key and set _tls_mutual: 1ms
Client #setTlsClientCertAndKey should generate a new ephemeral key and set _tls_mutual when only clie ✓ Client #setTlsClientCertAndKey should generate a new ephemeral key and set _tls_mutual when only clientKey is missing: 0ms
✓ Client #addTlsClientCertAndKey should add the current _tls_mutual values to the options object: 0ms
✓ Client #addTlsClientCertAndKey should add the current _tls_mutual values to the options object: 0ms
Client #addTlsClientCertAndKey should not add the current _tls_mutual values to the options object wh ✓ Client #addTlsClientCertAndKey should not add the current _tls_mutual values to the options object when auto generated: 0ms
✓ Client #addConnectionOptions should add in an options and keep what is there: 0ms
✓ Client #addConnectionOptions should add in no options: 0ms
✓ Client #isDevMode should return _devMode: 0ms
✓ Client #setDevMove should set the value of _devMode: 0ms
✓ Client #newChannel should throw if _channels.get returns true: 0ms
✓ Client #newChannel should create, add and return a new channel: 1ms
✓ Client #getChannel should get the channel with its name and return it: 0ms
✓ Client #getChannel should get a channel without its name and return it: 0ms
Client #getChannel should check the _network_config if no channel is returned and return the discover ✓ Client #getChannel should check the _network_config if no channel is returned and return the discovered channel: 0ms
✓ Client #getChannel should return null as channel does not exist: 0ms
✓ Client #getChannel should return null since no channels are defined in _network_config: 0ms
✓ Client #getChannel should return null since _network_config does not exist: 0ms
✓ Client #getChannel should call logger.error and return null if errors are turned off: 0ms
✓ Client #getChannel should call logger.error and throw an error if errors are turned on: 0ms
✓ Client #newPeer should create and return a new peer instance: 0ms
✓ Client #getPeer should return a peer: 0ms
✓ Client #getPeer should throw an error if _network_config not defined: 0ms
✓ Client #getPeersForOrg returns peers for specified org: 2ms
✓ Client #getPeersForOrg returns peers for client org in connection profile if no org specified: 1ms
✓ Client #getPeersForOrg returns empty list if no org specified and no mspid present: 0ms
✓ Client #getPeersForOrg returns empty list if organisation not in config: 1ms
Client #getPeersForOrg returns peers for user context MSP ID if no org specified and no client org in ✓ Client #getPeersForOrg returns peers for user context MSP ID if no org specified and no client org in connection profile: 1ms
✓ Client #newOrderer should create and return a new peer instance: 0ms
✓ Client #getOrderer should return an orderer: 0ms
✓ Client #getOrderer should throw an error when an orderer is not found: 0ms
✓ Client #getPeersForOrgOnChannel should return an array of peers in an org available on the channel: 0ms
Client #getPeersForOrgOnChannel should return an array of peers in an org available on the channel wh ✓ Client #getPeersForOrgOnChannel should return an array of peers in an org available on the channel when given a single channel name: 0ms
✓ Client #getCertificateAuthority should throw an error if _network_config is not given: 0ms
✓ Client #getCertificateAuthority should throw an error if _cryptoSuite is not given: 0ms
✓ Client #getCertificateAuthority should throw an error if ca info is not found: 1ms
✓ Client #getCertificateAuthority should throw an error if the client config is not found: 0ms
✓ Client #getCertificateAuthority should throw an error if the organization config is not found: 0ms
✓ Client #getCertificateAuthority should throw an error if no ca's are found: 0ms
Client #getCertificateAuthority should discover certificate authorities and return the first it finds ✓ Client #getCertificateAuthority should discover certificate authorities and return the first it finds: 0ms
✓ Client #_buildCAfromConfig should return the ca service: 0ms
✓ Client #_buildCAfromConfig should return the ca service if no certs are returned: 0ms
✓ Client #getClientConfig should return the client config: 1ms
✓ Client #getClientConfig should return null: 0ms
✓ Client #getMspid MSP ID initially unset: 0ms
Client #getMspid MSP ID of the org in the client section of the connection profile if loaded from con ✓ Client #getMspid MSP ID of the org in the client section of the connection profile if loaded from config: 0ms
✓ Client #getMspid MSP ID of the user context if set: 0ms
✓ Client #getMspid MSP ID of the user context in preference to value from connection profile: 0ms
✓ Client #newTransactionID should throw if typeof admin is not boolean: 0ms
Client #newTransactionID should call logger.debug and create a new transactionID instance if admin is ✓ Client #newTransactionID should call logger.debug and create a new transactionID instance if admin is not set: 1ms
Client #newTransactionID should call logger.debug and create a new transactionID instance if admin is ✓ Client #newTransactionID should call logger.debug and create a new transactionID instance if admin is true: 0ms
Client #newTransactionID should call logger.debug and create a new transactionID instance if admin is ✓ Client #newTransactionID should call logger.debug and create a new transactionID instance if admin is false: 1ms
✓ Client #extractChannelConfig should return the config update as a buffer: 1ms
✓ Client #signChannelConfig should throw an error if no config is given: 0ms
✓ Client #signChannelConfig should throw an error if config is not a buffer: 0ms
✓ Client #signChannelConfig should return a proto config signature: 0ms
✓ Client #createChannel should create a new channel: 0ms
✓ Client #updateChannel should update an existing channel: 0ms
✓ Client #_createOrUpdateChannel should throw an error if request is not given: 0ms
✓ Client #_createOrUpdateChannel should throw an error if request.name is not given: 0ms
✓ Client #_createOrUpdateChannel should throw an error if request.txId is not given: 0ms
✓ Client #_createOrUpdateChannel should throw an error if request.config is not given: 0ms
✓ Client #_createOrUpdateChannel should throw an error if request.signatures is not given: 0ms
✓ Client #_createOrUpdateChannel should throw an error if request.signatures is not an array: 1ms
Client #_createOrUpdateChannel should return the results of the broadcast when have_envelope is true: ✓ Client #_createOrUpdateChannel should return the results of the broadcast when have_envelope is true: 0ms
Client #_createOrUpdateChannel should return the results of the boradcase when have_envelope is false ✓ Client #_createOrUpdateChannel should return the results of the boradcase when have_envelope is false: 1ms
✓ Client #queryPeers should throw an error if no request is given: 0ms
✓ Client #queryPeers should throw an error if no request.target is given: 0ms
✓ Client #queryPeers should throw an error if undefined target peers are found: 1ms
✓ Client #queryPeers should throw an error if no target peers are found: 0ms
✓ Client #queryPeers should throw if creating a channel object throws: 1ms
Client #queryPeers should call discover with the generated discover_request and return the discovered ✓ Client #queryPeers should call discover with the generated discover_request and return the discovered peers: 0ms
✓ Client #queryChannels should throw an error if peer is not given: 0ms
✓ Client #queryChannels should throw an error if the response is an instance of error: 0ms
✓ Client #queryChannels should throw an error if the transaction proposal is not found: 1ms
✓ Client #queryChannels should throw an error if we are unsure what is happening: 1ms
✓ Client #queryChannels should throw an error if transaction proposal results are not arrays: 1ms
✓ Client #queryChannels should return the query trans for a channel: 0ms
✓ Client #queryInstalledChaincodes should throw an error if peer is not given: 0ms
✓ Client #queryInstalledChaincodes should throw an error if we are unsure what is happening: 0ms
✓ Client #queryInstalledChaincodes should throw an error if the response is not an array: 1ms
✓ Client #queryInstalledChaincodes should throw an error if the response has no response property: 0ms
✓ Client #queryInstalledChaincodes should throw an error if the transaction proposal is not found: 0ms
✓ Client #queryInstalledChaincodes should return the query trans for a channel: 0ms
✓ Client #installChaincode should throw error if not request given: 1ms
✓ Client #installChaincode should throw error if chaincodeId not specified: 0ms
✓ Client #installChaincode should throw error if chaincodeVersion not specified: 0ms
✓ Client #installChaincode should throw error if chaincodePath not specified: 0ms
✓ Client #installChaincode should throw error if no peers found: 0ms
✓ Client #installChaincode should install using chaincode ID, chaincode version, and chaincode path: 2ms
Client #installChaincode should install using chaincode ID, chaincode version, chaincode path, and ch ✓ Client #installChaincode should install using chaincode ID, chaincode version, chaincode path, and chaincode type: 2ms
Client #installChaincode should install using chaincode ID, chaincode version, chaincode path, chainc ✓ Client #installChaincode should install using chaincode ID, chaincode version, chaincode path, chaincode type, and metadata path: 3ms
✓ Client #installChaincode should install, but not package, when dev mode is enabled: 1ms
✓ Client #installChaincode should install using a chaincode package: 1ms
✓ Client #installChaincode should install using an explicit transaction ID: 2ms
✓ Client #installChaincode should install using the specified target peers: 2ms
✓ Client #installChaincode should install using the peers discovered for the channel: 1ms
✓ Client #initCredentialStores should throw an error if no _network_config is present: 0ms
✓ Client #initCredentialStores should throw an error if no client config is returned: 0ms
✓ Client #initCredentialStores should return true and set the cryptokeystore: 0ms
✓ Client #setStateStore should thow an error if a class method in keyValueStore is not a function: 0ms
✓ Client #setStateStore should set _stateStore and _userContext properties: 0ms
✓ Client #_getSigningIdentity should throw an error if not admin identity and no user context present: 0ms
✓ Client #_getSigningIdentity should reutrn the admin identity: 0ms
✓ Client #_getSigningIdentity should return the users signing identify: 0ms
✓ Client #setAdminSigningIdentity should throw if no private key is given: 0ms
✓ Client #setAdminSigningIdentity should throw if private key is null: 1ms
✓ Client #setAdminSigningIdentity should throw if private key is empty string: 0ms
✓ Client #setAdminSigningIdentity should throw if no certificate key is given: 0ms
✓ Client #setAdminSigningIdentity should throw if certificate is null: 0ms
✓ Client #setAdminSigningIdentity should throw if certificate is empty string: 3ms
✓ Client #setAdminSigningIdentity should throw if no mspid is given: 1ms
✓ Client #setAdminSigningIdentity should throw if certificate is null: 0ms
✓ Client #setAdminSigningIdentity should throw if certificate is empty string: 0ms
Client #setAdminSigningIdentity should retrieve CryptoSuite and import the public and private keys be ✓ Client #setAdminSigningIdentity should retrieve CryptoSuite and import the public and private keys before creating an identity: 1ms
Client #setAdminSigningIdentity should create a new CryptoSuite and import the public and private key ✓ Client #setAdminSigningIdentity should create a new CryptoSuite and import the public and private keys before creating an identity: 0ms
✓ Client #_setAdminFromConfig should throw an error if no network config is present: 0ms
✓ Client #_setAdminFromConfig should not call anything if client config is null: 0ms
✓ Client #_setAdminFromConfig should attempt to retrieve organization info: 0ms
Client #_setAdminFromConfig should retrieve organization info and call setAdmnSigningIdentity with it ✓ Client #_setAdminFromConfig should retrieve organization info and call setAdmnSigningIdentity with it: 0ms
✓ Client #_setMspidFromConfig should throw if network config is not found: 1ms
✓ Client #_setMspidFromConfig should call nothing if getClientConfig returns nothing: 0ms
✓ Client #_setMspidFromConfig should call nothing if getOrganization returns nothing: 0ms
✓ Client #_setMspidFromConfig should set _mspid: 0ms
✓ Client #_addConnectionOptionsFromConfig should throw if network config is not found: 0ms
✓ Client #_addConnectionOptionsFromConfig should call nothing if getClientConfig returns nothing: 0ms
✓ Client #_addConnectionOptionsFromConfig should set _connection_options: 1ms
✓ Client #_setUserFromConfig should throw an error if no username option is given: 0ms
✓ Client #_setUserFromConfig should throw if _network_config not set: 0ms
✓ Client #_setUserFromConfig should throw if _stateStore not set: 1ms
✓ Client #_setUserFromConfig should throw if _cryptoSuite not set: 0ms
✓ Client #_setUserFromConfig should return the user: 1ms
✓ Client #_setUserFromConfig should throw an error if user is not enrolled and no password is given: 0ms
✓ Client #_setUserFromConfig should throw an error if no client config is found: 0ms
✓ Client #_setUserFromConfig should throw an error if no organization config is found: 0ms
✓ Client #_setUserFromConfig should create a user when private key is accessible: 0ms
✓ Client #_setUserFromConfig should create a user when private key is not accessible: 0ms
Client #_setUserFromConfig should create a user when private key is not accessible and whos key is va ✓ Client #_setUserFromConfig should create a user when private key is not accessible and whos key is valid: 0ms
✓ Client #saveUserToStateStore should throw if no _userContext found: 1ms
✓ Client #saveUserToStateStore should throw if _userContext.name is not found: 0ms
✓ Client #saveUserToStateStore should throw if _stateStore is not found: 1ms
✓ Client #saveUserToStateStore should return the user context: 0ms
✓ Client #setUserContext should throw an error if user is not set: 1ms
✓ Client #setUserContext should save the user to the state store and return it: 0ms
✓ Client #setUserContext should return the saved user: 0ms
✓ Client #setUserContext should return the unsaved user: 0ms
✓ Client #getUserContext should throw an error if name is undefined and checkPersistence is truthy: 0ms
✓ Client #getUserContext should throw an error if checkPersistence truthy and name invalid: 0ms
✓ Client #getUserContext should throw an error if checkPersistence truthy and name invalid: 0ms
✓ Client #getUserContext should throw an error if checkPersistence truthy and name invalid: 0ms
✓ Client #getUserContext should throw an error if checkPersistence truthy and name invalid: 0ms
✓ Client #getUserContext should return _userContext if _userContext.getName returns value: 0ms
✓ Client #getUserContext should return _userContext if _userContext and name given: 0ms
✓ Client #getUserContext should return null if name is not set: 0ms
✓ Client #getUserContext should return null if _stateStore is null: 0ms
✓ Client #getUserContext should return the retrieved user context: 0ms
✓ Client #getUserContext should return null when user context not found: 0ms
✓ Client #getUserContext should return null when checkPersistence is not a boolean: 0ms
✓ Client #loadUserFromStateStore should return null if no memberStr found: 0ms
✓ Client #loadUserFromStateStore should return null if newUser to data returns nothing: 0ms
✓ Client #loadUserFromStateStore should return the user: 1ms
✓ Client #getStateStore should return the _stateStore: 0ms
✓ Client #createUser should throw an error if no opts are given: 0ms
✓ Client #createUser should throw an error if opts.username is not given: 0ms
✓ Client #createUser should throw an error if opts.username is less than 1 character long: 1ms
✓ Client #createUser should throw an error if opts.mspid is less than 1 character long: 0ms
✓ Client #createUser should throw an error if opts.cryptoContent is not given: 0ms
Client #createUser should throw an error if opts.cryptoContent.privateKey and privateKeyPEM are not g ✓ Client #createUser should throw an error if opts.cryptoContent.privateKey and privateKeyPEM are not given: 0ms
Client #createUser should throw an error if opts.cryptoContent.privateKey, privateKeyPEM and privateK ✓ Client #createUser should throw an error if opts.cryptoContent.privateKey, privateKeyPEM and privateKeyObj are not given: 0ms
Client #createUser should throw an error if opts.cryptoContent.signedCert and signedCertPEM are not g ✓ Client #createUser should throw an error if opts.cryptoContent.signedCert and signedCertPEM are not given: 0ms
✓ Client #createUser should return a user: 0ms
✓ Client #createUser should return a user if getCryptoSuite returns null: 9ms
✓ Client #createUser should return a user if getCryptoSuite does not return null: 0ms
✓ Client #createUser should return a user if getCryptoSuite does not return null: 1ms
✓ Client #createUser should return a user if getCryptoSuite does not return null: 1ms
✓ Client #createUser should return a user if getCryptoSuite does not return null: 1ms
✓ Client #getTargetPeers should throw an error if the target peer is empty object: 0ms
✓ Client #getTargetPeers should return null if no targets are provided: 0ms
✓ Client #getTargetPeers should get the peer if peer names are given: 0ms
✓ Client #getTargetPeers should return the peer if list of peer objects passed in: 0ms
✓ Client #getTargetOrderer should throw an error if request_orderer is not given: 0ms
Client #getTargetOrderer should throw an error if request_orderer is not a string or instance of Orde ✓ Client #getTargetOrderer should throw an error if request_orderer is not a string or instance of Orderer: 0ms
✓ Client #getTargetOrderer should throw an error if no channel config is found: 1ms
✓ Client #getTargetOrderer should throw an error if orderers arent found: 0ms
✓ Client #getTargetOrderer should return the orderer if orderer given as string: 1ms
✓ Client #getTargetOrderer should return the orderer if orderer is instance of Orderer: 0ms
✓ Client #getTargetOrderer should return channel orderer if request_orderers not given: 0ms
✓ Client #getTargetOrderer should get a channel and return an orderer: 0ms
✓ Client #getClientCertHash should return the clientCertHash in client._tls_mutual: 0ms
✓ Client #getClientCertHash should create a cert and key and return null: 0ms
✓ Client #getClientCertHash should create and return the cert hash: 0ms
✓ Client #_buildConnectionOptions should contain option from original option: 0ms
✓ Client #_buildConnectionOptions should contain cert from tls: 0ms
✓ Client #_buildConnectionOptions should not override original option: 0ms
✓ Client #_buildConnectionOptions should call _buildConnectionOptions and return opts: 0ms
✓ Client computeHash should return then hash: 1ms
✓ Client readFile should reject with error: 0ms
✓ Client readFile should resolve with null: 0ms
✓ Client readFile should resolve with the data: 0ms
✓ Client _stringToSignature should return an empty aray if no signatures are given: 0ms
Client _stringToSignature should return a list of signatures if signature contains correct properties ✓ Client _stringToSignature should return a list of signatures if signature contains correct properties: 0ms
✓ Client _stringToSignature should return a list of signatures that have been decoded: 0ms
✓ Client _getNetworkConfig should throw an error if there is no configuration given: 0ms
✓ Client _getNetworkConfig should throw if config.version is missing: 1ms
✓ Client _getNetworkConfig should throw if schema config is missing: 0ms
✓ Client _getNetworkConfig should throw if schema config is missing: 0ms
✓ Client _getNetworkConfig should return the new network config when config is an object: 0ms
✓ Client _getNetworkConfig should return the new network config when config is a yaml file path: 1ms
✓ Client _getNetworkConfig should return the new network config when config is a yml file path: 1ms
✓ Client _getNetworkConfig should return the new network config when config is a yaml file path: 0ms
✓ Client _getNetworkConfig should return the new network config when config is a yaml file path: 0ms
✓ Config #constructor should call nconf, Config.mapSettings and set the correct properties: 0ms
✓ Config #mapSettings should add the settings to the store: 5ms
✓ Config #reorderFileStores should re-add file store items where bottom is false: 5ms
✓ Config #reorderFileStores should re-add file store items where bottom is true: 5ms
✓ Config #file should call Config.reorderFileStores when given a string: 8ms
✓ Config #file should throw an error when not given a string: 5ms
✓ Config #get should return a value when _config.get does not throw error: 5ms
✓ Config #get should return the default value when _config.get does not throw error: 5ms
✓ Config #get should return the default value when _config.get returns null: 5ms
✓ Config #get should return the default value when _config.get returns undefined: 5ms
✓ Config #set should call _config.set: 6ms
✓ Constants should set the correct LSCC constant: 0ms
✓ Constants should set the correct QSCC constant: 0ms
✓ Constants should set the correct CSCC constant: 0ms
✓ Constants should set the correct SYSTEM_CHANNEL_NAME constant: 0ms
✓ Constants should set the correct NetworkConfig.ENDORSING_PEER_ROLE constant: 0ms
✓ Constants should set the correct NetworkConfig.CHAINCODE_QUERY_ROLE constant: 0ms
✓ Constants should set the correct NetworkConfig.LEDGER_QUERY_ROLE constant: 0ms
✓ Constants should set the correct NetworkConfig.EVENT_SOURCE_ROLE constant: 0ms
✓ Constants should set the correct NetworkConfig.DISCOVERY_ROLE constant: 0ms
✓ Constants should set the correct NetworkConfig.ALL_ROLES constant: 0ms
✓ Constants should set the correct NetworkConfig.ROLES constant: 0ms
✓ Orderer #constructor should not permit creation with a non-valid url: 1ms
1) Orderer #constructor should not permit creation without an url
✓ Orderer #close should call close on the orderer client: 0ms
✓ Orderer #close should not call close on the orderer client: 0ms
✓ Orderer #sendBroadcast should reject a Promise if envelope does not exist: 1ms
✓ Orderer #sendBroadcast should log and reject on error during `waitForReady`: 1ms
✓ Orderer #sendBroadcast should log and reject a Promise on timeout: 2ms
✓ Orderer #sendBroadcast should log and reject if there is an invalid response: 1ms
Orderer #sendBroadcast should log and reject if there is an error in the response with no error code: ✓ Orderer #sendBroadcast should log and reject if there is an error in the response with no error code: 1ms
Orderer #sendBroadcast should log and reject if there is an error in the response with a non-matched ✓ Orderer #sendBroadcast should log and reject if there is an error in the response with a non-matched error code: 1ms
Orderer #sendBroadcast should log and reject if there is an error in the response with a matched erro ✓ Orderer #sendBroadcast should log and reject if there is an error in the response with a matched error code: 1ms
Orderer #sendBroadcast should log and reject if there is an object error in the response with a match ✓ Orderer #sendBroadcast should log and reject if there is an object error in the response with a matched error code: 0ms
Orderer #sendBroadcast should log and reject if there is an object error in the response without a ma ✓ Orderer #sendBroadcast should log and reject if there is an object error in the response without a matched error code: 1ms
✓ Orderer #sendBroadcast should resolve if there is a valid response: 1ms
✓ Orderer #sendDeliver should reject a Promise if envelope does not exist: 1ms
✓ Orderer #sendDeliver should reject on error during `waitForReady`: 0ms
✓ Orderer #sendDeliver should log and reject on error during `deliver`: 1ms
✓ Orderer #sendDeliver should reject a Promise on timeout: 2ms
✓ Orderer #sendDeliver should log and reject a Promise on if no `Type` within response: 1ms
✓ Orderer #sendDeliver should log and reject a Promise on if no `SUCCESS` within status response: 1ms
Orderer #sendDeliver should reject if there is an error in the response with a non-matched error code ✓ Orderer #sendDeliver should reject if there is an error in the response with a non-matched error code: 1ms
Orderer #sendDeliver should reject if there is an error in the response with a no error code and disc ✓ Orderer #sendDeliver should reject if there is an error in the response with a no error code and disconnect: 1ms
Orderer #sendDeliver should reject if there is an error in the response with a non-matched error code ✓ Orderer #sendDeliver should reject if there is an error in the response with a non-matched error code and disconnect: 1ms
Orderer #sendDeliver should log and reject if there is an error in the response with a matched error ✓ Orderer #sendDeliver should log and reject if there is an error in the response with a matched error code and disconnect: 1ms
Orderer #sendDeliver should log and reject if there is an error in the response with a matched error ✓ Orderer #sendDeliver should log and reject if there is an error in the response with a matched error code and disconnect if returned error is an Error object: 1ms
✓ Orderer #sendDeliver should log and reject if string error is thrown: 1ms
✓ Orderer #sendDeliver should log on status updates: 1ms
✓ Orderer #sendDeliver should deal with `block` and `status` response types : 1ms
✓ Orderer #toString should return a printable representation of the object: 0ms
✓ Organization #constructor should throw if name parameter is missing: 0ms
✓ Organization #constructor should throw if name parameter is null: 1ms
✓ Organization #constructor should throw if mspid parameter is missing: 0ms
✓ Organization #constructor should throw if mspid parameter is null: 0ms
✓ Organization #constructor should log entry: 0ms
✓ Organization #constructor should initialise parameters: 0ms
✓ Organization #getName should get the organization name: 0ms
✓ Organization #getMspid should get the mspid: 0ms
✓ Organization #addPeer should add a peer to the internal array: 0ms
✓ Organization #getPeers should get the peers array: 1ms
✓ Organization #addCertificateAuthority should add a certificate authority to the internal array: 0ms
✓ Organization #getCertificateAuthorities should get the certificate authority array: 0ms
✓ Organization #setAdminPrivateKey should set the admin private key: 1ms
✓ Organization #getAdminPrivateKey should return the admin private key: 0ms
✓ Organization #setAdminCert should set the admin certificate: 0ms
✓ Organization #getAdminCert should return the admin certificate: 0ms
✓ Organization #toString should return a string representation of the Organization object: 1ms
✓ Package #fromBuffer should load a smart contract package from a buffer [golang]: 1ms
✓ Package #fromBuffer should load a smart contract package from a buffer with metadata [golang]: 4ms
✓ Package #fromBuffer should load a smart contract package from a buffer [javascript]: 2ms
✓ Package #fromBuffer should load a smart contract package from a buffer with metadata [javascript]: 1ms
✓ Package #fromBuffer should load a smart contract package from a buffer [typescript]: 2ms
✓ Package #fromBuffer should load a smart contract package from a buffer with metadata [typescript]: 1ms
✓ Package #fromBuffer should load a smart contract package from a buffer [java]: 1ms
✓ Package #fromBuffer should load a smart contract package from a buffer with metadata [java]: 2ms
✓ Package #fromDirectory should throw an error for an empty smart contract name [golang]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract name [golang]: 0ms
✓ Package #fromDirectory should throw an error for an empty smart contract version [golang]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract version [golang]: 0ms
✓ Package #fromDirectory should create a smart contract package from a directory [golang]: 9ms
Package #fromDirectory should create a smart contract package from a directory with metadata [golang] ✓ Package #fromDirectory should create a smart contract package from a directory with metadata [golang]: 3ms
✓ Package #fromDirectory should throw an error for an empty smart contract name [javascript]: 1ms
✓ Package #fromDirectory should throw an error for an invalid smart contract name [javascript]: 0ms
✓ Package #fromDirectory should throw an error for an empty smart contract version [javascript]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract version [javascript]: 0ms
✓ Package #fromDirectory should create a smart contract package from a directory [javascript]: 7ms
Package #fromDirectory should create a smart contract package from a directory with metadata [javascr ✓ Package #fromDirectory should create a smart contract package from a directory with metadata [javascript]: 5ms
✓ Package #fromDirectory should throw an error for an empty smart contract name [typescript]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract name [typescript]: 0ms
✓ Package #fromDirectory should throw an error for an empty smart contract version [typescript]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract version [typescript]: 0ms
✓ Package #fromDirectory should create a smart contract package from a directory [typescript]: 4ms
Package #fromDirectory should create a smart contract package from a directory with metadata [typescr ✓ Package #fromDirectory should create a smart contract package from a directory with metadata [typescript]: 4ms
✓ Package #fromDirectory should throw an error for an empty smart contract name [java]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract name [java]: 0ms
✓ Package #fromDirectory should throw an error for an empty smart contract version [java]: 0ms
✓ Package #fromDirectory should throw an error for an invalid smart contract version [java]: 0ms
✓ Package #fromDirectory should create a smart contract package from a directory [java]: 4ms
✓ Package #fromDirectory should create a smart contract package from a directory with metadata [java]: 3ms
✓ Package #toBuffer should save a smart contract package to a buffer [golang]: 0ms
✓ Package #toBuffer should save a smart contract package to a buffer [javascript]: 2ms
✓ Package #toBuffer should save a smart contract package to a buffer [typescript]: 1ms
✓ Package #toBuffer should save a smart contract package to a buffer [java]: 1ms
✓ Packager #package should log on entry: 0ms
✓ Packager #package should log and not package if in dev mode: 0ms
✓ Packager #package should reject if missing chaincodePath parameter: 1ms
✓ Packager #package should log and handle `node` chaincode types: 0ms
✓ Packager #package should handle `CAR` chaincode types: 1ms
✓ Packager #package should handle default `goLang` chaincode types: 0ms
✓ Packager #package should handle `JAVA` chaincode types: 1ms
✓ Peer #constructor should not permit creation with a non-valid url: 0ms
2) Peer #constructor should not permit creation without an url
✓ Peer #close should call close on the endorser client if it exists: 0ms
✓ Peer #close should call close on the discovery client if it exists: 1ms
✓ Peer #sendProposal should log function entry: 1ms
(node:28133) UnhandledPromiseRejectionWarning: AssertionError: expected [ Array(1) ] to deeply equal [ Array(4) ]
at obj.sendProposal.then.catch (/home/antonio/code/test/fabric-sdk-node/fabric-client/test/Peer.js:108:44)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
(node:28133) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 114)
(node:28133) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✓ Peer #sendProposal should reject if no proposal: 0ms
✓ Peer #sendProposal should reject on timeout: 2ms
✓ Peer #sendProposal should log and reject Error object on proposal response error string: 1ms
✓ Peer #sendProposal should reject Error object on proposal response error object: 1ms
✓ Peer #sendProposal should log and reject on undefined proposal response: 1ms
✓ Peer #sendProposal should log and reject on invalid proposal response: 1ms
Peer #sendProposal should log and reject on proposal response error status greater than or equal to 4 ✓ Peer #sendProposal should log and reject on proposal response error status greater than or equal to 400: 0ms
✓ Peer #sendProposal should resolve on valid proposal response: 1ms
✓ Peer #sendProposal should mark errors from chaincode as proposal response: 1ms
✓ Peer #sendProposal should not mark errors as proposal response if not a proposal response: 2ms
✓ Peer #sendDiscovery should log on entry: 0ms
(node:28133) UnhandledPromiseRejectionWarning: AssertionError: expected [ Array(1) ] to deeply equal [ '%s - Start', 'sendDiscovery' ]
at obj.sendDiscovery.then.catch (/home/antonio/code/test/fabric-sdk-node/fabric-client/test/Peer.js:389:44)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
(node:28133) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 124)
✓ Peer #sendDiscovery should reject if no request to send: 0ms
✓ Peer #sendDiscovery should log and reject on timeout: 2ms
✓ Peer #sendDiscovery should log and reject Error object on discover Response error string: 0ms
✓ Peer #sendDiscovery should log and reject Error object on discover Response error object: 0ms
✓ Peer #sendDiscovery should log and reject Error object on null response from discovery: 1ms
✓ Peer #sendDiscovery should log and resolve on good response from discover: 1ms
✓ Peer #toString should return a string representation of the object: 0ms
✓ Policy #EndorsementPolicy.buildPolicy should throw if no policy provided and no valid msps: 0ms
Policy #EndorsementPolicy.buildPolicy should create and set a one of any policy if no policy provided ✓ Policy #EndorsementPolicy.buildPolicy should create and set a one of any policy if no policy provided: 1ms
✓ Policy #EndorsementPolicy.buildPolicy should use the policy if provided: 1ms
✓ Policy #buildPrincipal should throw if the identity type is unknown: 0ms
✓ Policy #buildPrincipal should throw if the identity type is unimplemented: 0ms
✓ Policy #buildPrincipal should throw if invalid role name passed: 0ms
✓ Policy #buildPrincipal should throw if invalid mspid passed: 1ms
✓ Policy #buildPrincipal should throw if no mspid passed: 0ms
✓ Policy #buildPrincipal should set the role to peer if peer role: 0ms
✓ Policy #buildPrincipal should set the role to member if member role: 0ms
✓ Policy #buildPrincipal should set the role to admin if admin role: 1ms
✓ Policy #getIdentityType should throw no identity type: 0ms
✓ Policy #getIdentityType should throw if an invalid identity type: 0ms
✓ Policy #getIdentityType should return role type: 1ms
✓ Policy #getIdentityType should return organisation type: 0ms
✓ Policy #getIdentityType should return identity type: 0ms
✓ Policy #getPolicyType should throw if invalid type found: 0ms
✓ Policy #getPolicyType should throw if invalid type found: 0ms
✓ Policy #getPolicyType should return "signed-by" if that is the policy type: 0ms
✓ Policy #getPolicyType should return "n-of" if that is the policy type: 0ms
Policy #parsePolicy should return a signiture policy with the type "signedby" set if that policy type ✓ Policy #parsePolicy should return a signiture policy with the type "signedby" set if that policy type: 0ms
Policy #parsePolicy should return a signiture policy with the type "n_out_of" set if that policy type ✓ Policy #parsePolicy should return a signiture policy with the type "n_out_of" set if that policy type: 0ms
✓ Policy #buildSignaturePolicy should return signed by if that policy type: 0ms
✓ Policy #buildSignaturePolicy should recursively build if n-of detected: 1ms
✓ Policy #checkPolicy should throw if missing a passed parameter: 0ms
✓ Policy #checkPolicy should throw if passed parameter is null: 0ms
✓ Policy #checkPolicy should throw if passed parameter is undefined: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.identities is missing: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.identities is null: 1ms
✓ Policy #checkPolicy should throw if passed parameter policy.identities is undefined: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.identities is an empty string: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.identities is an empty object: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.identities is not an array: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.policy is missing: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.policy is null: 1ms
✓ Policy #checkPolicy should throw if passed parameter policy.policy is undefined: 0ms
✓ Policy #checkPolicy should throw if passed parameter policy.policy is an empty object: 0ms
✓ Policy #checkPolicy should not throw if passed a valid policy: 0ms
✓ Remote #constructor should create a valid instance without any opts: 1ms
✓ Remote #constructor should create a valid instance without any opts but with defaults given: 1ms
✓ Remote #constructor should throw error if opts value is not an integer or a string: 0ms
✓ Remote #constructor should ignore pem and ssl-target-name-override opts: 0ms
✓ Remote #constructor should create a valid remote instance when given minimum parameters: 0ms
✓ Remote #constructor should create a valid remote instance when given all v10 parameters: 0ms
✓ Remote #constructor should create a valid remote instance when given all non-v10 parameters: 0ms
✓ Remote #waitForReady should throw if client is not given: 0ms
Remote #waitForReady should return a rejected promise after calling client.waitForReady logging the e ✓ Remote #waitForReady should return a rejected promise after calling client.waitForReady logging the error: 0ms
Remote #waitForReady should return a rejected promise after calling client.waitForReady logging the e ✓ Remote #waitForReady should return a rejected promise after calling client.waitForReady logging the error: 0ms
✓ Remote #waitForReady should return a resolved promise after calling client.waitForReady: 1ms
✓ Remote #getName should return the _name property: 0ms
✓ Remote #setName should set the _name property: 0ms
✓ Remote #getUrl should set the _name property: 0ms
✓ Remote #getClientCertHash should return the hashed client certificate: 1ms
✓ Remote #getClientCertHash should return null when no client certificate is given: 0ms
✓ Remote #getCharacteristics should get the url characteristics: 0ms
✓ Remote #getCharacteristics should get the name characteristics: 0ms
✓ Remote #getCharacteristics should get the options characteristics: 0ms
✓ Remote #toString should return a string representation of the object: 0ms
✓ Endpoint #constructor should throw an error if no protocol is returned: 1ms
✓ Endpoint #constructor should throw an error if neither grpc or grpcs are specified: 0ms
✓ Endpoint #constructor should throw an error if the pem certificate is not a string when using grpcs: 1ms
✓ Endpoint #constructor should throw an error client key and client certificate aren't strings: 0ms
✓ Endpoint #constructor should throw an error if only clientKey given: 0ms
✓ Endpoint #constructor should throw an error if only clientCert: 0ms
✓ Endpoint #constructor should create new credentials with the client key and client certificate: 1ms
✓ Endpoint #constructor should create a valid instance with minimum paramaters: 1ms
✓ Endpoint #constructor should create new credentials without the client key and client certificate: 1ms
✓ SideDB #CollectionConfig.buildCollectionConfigPackage should log error and throw if passed null: 0ms
SideDB #CollectionConfig.buildCollectionConfigPackage should log and should throw if passed undefined ✓ SideDB #CollectionConfig.buildCollectionConfigPackage should log and should throw if passed undefined: 0ms
SideDB #CollectionConfig.buildCollectionConfigPackage should log and should throw if passed non-strin ✓ SideDB #CollectionConfig.buildCollectionConfigPackage should log and should throw if passed non-string or array object: 0ms
SideDB #CollectionConfig.buildCollectionConfigPackage should log and build a collectionConfigPackage ✓ SideDB #CollectionConfig.buildCollectionConfigPackage should log and build a collectionConfigPackage from each config item if passed a string: 1ms
SideDB #CollectionConfig.buildCollectionConfigPackage should build a collectionConfigPackage from eac ✓ SideDB #CollectionConfig.buildCollectionConfigPackage should build a collectionConfigPackage from each config item if passed an Array: 1ms
✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed no parameters: 0ms
✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed an empty object: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.name does not ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.name does not exist: 1ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.name is not a ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.name is not a string: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.policy does no ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.policy does not exist: 0ms
SideDB #CollectionConfig.checkCollectionConfig should call `checkPolicy` on passed collectionConfig.p ✓ SideDB #CollectionConfig.checkCollectionConfig should call `checkPolicy` on passed collectionConfig.policy: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.maxPeerCount i ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.maxPeerCount is not provided: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.maxPeerCount i ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.maxPeerCount is not an integer: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.requiredPeerCo ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.requiredPeerCount is not provided: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.requiredPeerCo ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.requiredPeerCount is not an integer: 1ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.maxPeerCount<c ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.maxPeerCount<collectionConfig.requiredPeerCount: 3ms
SideDB #CollectionConfig.checkCollectionConfig should default `blockToLive` to be zero if not passed ✓ SideDB #CollectionConfig.checkCollectionConfig should default `blockToLive` to be zero if not passed as a config item: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.blockToLive is ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.blockToLive is negative: 1ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.blockToLive is ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.blockToLive is not an integer string: 0ms
SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.blockToLive is ✓ SideDB #CollectionConfig.checkCollectionConfig should throw if passed collectionConfig.blockToLive is not a valid unsigned int64 string: 1ms
✓ SideDB #CollectionConfig.checkCollectionConfig should return if passed a correct collectionConfig: 1ms
✓ SideDB #CollectionConfig.buildCollectionConfig should log and throw if passed no parameters: 1ms
SideDB #CollectionConfig.buildCollectionConfig should call `checkCollectionConfig` with passed parame ✓ SideDB #CollectionConfig.buildCollectionConfig should call `checkCollectionConfig` with passed parameters: 0ms
✓ SideDB #CollectionConfig.buildCollectionConfig should build a principal for each passed identity: 1ms
✓ SideDB #CollectionConfig.buildCollectionConfig should build and return a signaturePolicyEnvelope: 0ms
✓ TransactionID #constructor should throw if missing Identity parameter: 1ms
TransactionID #constructor should set signer to be SigningIdentity if passed Identity parameter is of ✓ TransactionID #constructor should set signer to be SigningIdentity if passed Identity parameter is of class User: 0ms
✓ TransactionID #constructor should set signer to be passed Identity parameter is not of class User: 1ms
✓ TransactionID #constructor should set nonce from the sdkutils: 0ms
✓ TransactionID #constructor should set admin to be true if the passed boolean value is true: 0ms
✓ TransactionID #constructor should set admin to be false if the passed boolean value is false: 0ms
✓ TransactionID #getTransactionID should return transactionId: 1ms
✓ TransactionID #getNonce should return _nonce: 1ms
✓ TransactionID #isAdmin should return boolean true if admin: 1ms
✓ TransactionID #isAdmin should return boolean false if not admin: 0ms
✓ User #constructor should conditionally initialise parameters if cfg is a string: 1ms
User #constructor should conditionally initialise parameters if cfg is an object with an enrollmentID ✓ User #constructor should conditionally initialise parameters if cfg is an object with an enrollmentID and roles: 0ms
User #constructor should conditionally initialise parameters if cfg is an object without an enrollmen ✓ User #constructor should conditionally initialise parameters if cfg is an object without an enrollmentID or roles: 0ms
✓ User #getName should get the user name: 0ms
✓ User #getRoles should get the users roles: 0ms
✓ User #setRoles should set the users roles: 0ms
✓ User #getAffiliation should get the users affiliation: 0ms
✓ User #setAffiliation should set the users affiliation: 0ms
✓ User #getIdentity should get the users identity: 0ms
✓ User #getSigningIdentity should get the users signing identity: 0ms
✓ User #getCryptoSuite should get the users crypto suite: 0ms
✓ User #setCryptoSuite should set the users crypto suite: 0ms
✓ User #setEnrollment should throw error if no privateKey parameter: 0ms
✓ User #setEnrollment should throw error if the privateKey parameter is an empty string: 0ms
✓ User #setEnrollment should throw error if no certificate parameter: 0ms
✓ User #setEnrollment should throw error if certificate parameter is an empty string: 0ms
✓ User #setEnrollment should throw error if no mspId parameter: 0ms
✓ User #setEnrollment should throw error if mspId parameter is an empty string: 0ms
✓ User #setEnrollment should set the cryptoSuite if its not already set: 1ms
✓ User #setEnrollment should set users crypto key store if skipPersistance is false: 0ms
User #setEnrollment should create and set a pubKey variable if the cryptoKeyStore is set and skipPers ✓ User #setEnrollment should create and set a pubKey variable if the cryptoKeyStore is set and skipPersistence is false: 1ms
User #setEnrollment should create and set a pubKey variable if the either the cryptoKeyStore is not s ✓ User #setEnrollment should create and set a pubKey variable if the either the cryptoKeyStore is not set or skipPersitence is true: 0ms
✓ User #setEnrollment should set the users identity: 1ms
✓ User #setEnrollment should set the users signingIdentity: 0ms
✓ User #isEnrolled should return true if user has both an identity and a signing identity: 0ms
✓ User #isEnrolled should return false if user has no identity: 0ms
✓ User #isEnrolled should return false if user has no signing identity: 0ms
✓ User #isEnrolled should return false if user has no identity or signing identity: 0ms
✓ User #fromString should log and set the users state, name, roles, afilliation and enrollmentSecret: 0ms
✓ User #fromString should throw error if state name is not the same as user name: 0ms
✓ User #fromString should throw error if the state has no mspid: 0ms
✓ User #fromString should set the users mspid to the state mspid: 1ms
✓ User #fromString should set import_promise if no_save is true: 0ms
✓ User #fromString should throw an error if key is not set if no_save is true: 0ms
✓ User #fromString should set import_promise if no_save is false: 1ms
✓ User #fromString should return the _cryptoSuite key: 0ms
User #fromString should assign the self variable with a signing identity if the privateKey is private ✓ User #fromString should assign the self variable with a signing identity if the privateKey is private: 1ms
✓ User #fromString should throw error if private key is missing: 0ms
✓ User #toString should create a state and return it when the user has no signingIdentity or identity: 0ms
✓ User #toString should set serializedEnrollment.signingIdentity if the user has a signingIdentity: 0ms
User #toString should set serializedEnrollment.identity.certificate if the user has an identity.certi ✓ User #toString should set serializedEnrollment.identity.certificate if the user has an identity.certificate: 0ms
✓ User #User.isInstance should return true if every user parameter is defined: 0ms
✓ User #User.isInstance should return false if user._name is undefined: 0ms
✓ User #User.isInstance should return false if user._roles is undefined: 0ms
✓ User #User.isInstance should return false if user._affiliation is undefined: 0ms
✓ User #User.isInstance should return false if user._enrollmentSecret is undefined: 0ms
✓ User #User.isInstance should return false if user._identity is undefined: 0ms
✓ User #User.isInstance should return false if user._signingIdentity is undefined: 0ms
✓ User #User.isInstance should return false if user._mspId is undefined: 0ms
✓ User #User.isInstance should return false if user._cryptoSuite is undefined: 0ms
✓ client-utils #buildProposal should return a valid proposal when transientMap is an object: 0ms
✓ client-utils #buildProposal should return a valid proposal when transientMap is not an object: 1ms
client-utils #sendPeersProposal should return valid responses for one peer where proposals are fulfil ✓ client-utils #sendPeersProposal should return valid responses for one peer where proposals are fulfilled: 1ms
client-utils #sendPeersProposal should return valid responses for one peer where proposals are not fu ✓ client-utils #sendPeersProposal should return valid responses for one peer where proposals are not fulfilled: 1ms
client-utils #sendPeersProposal should return valid responses for two peers where one proposal is ful ✓ client-utils #sendPeersProposal should return valid responses for two peers where one proposal is fulfilled and one is not: 0ms
✓ client-utils #signProposal should return a valid signed proposal: 0ms
✓ client-utils #toEnvelope should return a valid envelope: 0ms
✓ client-utils #buildChannelHeader should return a channel header without any extra info: 0ms
✓ client-utils #buildChannelHeader should return a channel header with all extra info: 0ms
✓ client-utils #buildHeader should return a valid header: 0ms
✓ client-utils #checkProposalRequest should return the correct error message if no data given: 0ms
client-utils #checkProposalRequest should return the correct error message if no request.chaincodeId ✓ client-utils #checkProposalRequest should return the correct error message if no request.chaincodeId given: 0ms
client-utils #checkProposalRequest should return the correct error message if no request.rxId is give ✓ client-utils #checkProposalRequest should return the correct error message if no request.rxId is given: 0ms
✓ client-utils #checkProposalRequest should return null if no request.rxId or all are given: 0ms
✓ client-utils #checkInstallRequest should return the correct error message if no data is given: 0ms
client-utils #checkInstallRequest should return the correct error message if request.chaincodeVersion ✓ client-utils #checkInstallRequest should return the correct error message if request.chaincodeVersion is not given: 0ms
client-utils #checkInstallRequest should return the correct error message if request.chaincodeVersion ✓ client-utils #checkInstallRequest should return the correct error message if request.chaincodeVersion is given: 0ms
✓ client-utils #translateCCType should return the correct default type: 0ms
✓ client-utils #translateCCType should return the correct cc type: 0ms
✓ client-utils #ccTypeToString should return the correct string: 0ms
✓ client-utils #buildCurrentTimestamp should create a valid timestamp: 1ms
✓ hash_sha2_256 #hash should call the reset reset.update.finalize and return the correct value: 0ms
✓ hash_sha2_256 #reset should call crypto.createHash: 1ms
✓ hash_sha2_256 #finalize should call _hash.digest, reset and reurn the hash: 0ms
✓ hash_sha2_384 #hash should call the reset reset.update.finalize and return the correct value: 1ms
✓ hash_sha2_384 #reset should call crypto.createHash: 0ms
✓ hash_sha2_384 #finalize should call _hash.digest, reset and reurn the hash: 0ms
✓ hash_sha3_256 hashSimple should create an instance of sha3_256: 1ms
✓ hash_sha3_256 #reset should call sha3_256.create: 0ms
✓ hash_sha3_256 #finalize should call _hash.hex, reset and reurn the hash: 0ms
✓ hash_sha3_384 hashSimple should create an instance of hash_sha3_384: 0ms
✓ hash_sha3_384 #reset should call sha3_384.create: 0ms
✓ hash_sha3_384 #finalize should call _hash.hex, reset and reurn the hash: 0ms
✓ SHA2_256 should call hash and return an insatnce of hash_sha2_256: 0ms
✓ SHA2_384 should call hash and return an insatnce of hash_sha2_384: 0ms
✓ Utils #newCryptoSuite should return cryptoSuite instance when given all parameters: 1ms
✓ Utils #newCryptoSuite should return cryptoSuite instance when parameters missing: 1ms
✓ Utils #newCryptoSuite should throw an error if csImpl does not exist: 1ms
✓ Utils #newCryptoSuite should return cryptoSuite instance when no settings given: 0ms
✓ Utils #newKeyValueStore should create a new key value store: 4ms
✓ Utils #addConfigFile should call exports.getConfig and config.file: 0ms
✓ Utils #setConfigSetting should call exports.getConfig and config.set: 0ms
✓ Utils #getConfigSetting should call exports.getConfig and config.get: 0ms
✓ Utils #getConfig should return the global hfc config: 0ms
✓ Utils #getConfig should create new config instance and add it to the global hfc: 0ms
✓ Utils #getConfig should create new config instance and create new global hfc: 1ms
✓ Utils #bitsToBytes should return the correct value: 0ms
✓ Utils #bytesToBits should return the correct value: 0ms
✓ Utils #bytesToBits should return the correct value: 0ms
✓ Utils #zeroBuffer should return a buffer of length 10: 0ms
✓ Utils #toArrayBuffer should retun a buffer containing array items: 0ms
✓ Utils #toArrayBuffer should retun an empty ArrayBuffer: 0ms
✓ Utils #getNonce should throw an error if given a string: 0ms
✓ Utils #getNonce should throw an error if given an object: 0ms
✓ Utils #getNonce should return the result of crypto.randomBytes: 0ms
✓ Utils #getNonce should return the result of crypto.randomBytes and call getConfigSetting: 0ms
✓ Utils #getClassMethods should return the class methods for an instance: 0ms
✓ Utils #getBufferBit should return error=true if bit to mask exceeds buffer length: 0ms
✓ Utils #getBufferBit should return error=false invalid=1: 0ms
✓ Utils #getBufferBit should return error=false invalid=0: 0ms
✓ Utils #getDefaultKeyStorePath should return the default key store path: 0ms
✓ Utils #CryptoKeyStore should return a valid CryptoKeyStore instance when no opts are given: 0ms
✓ Utils #CryptoKeyStore should return a valid CryptoKeyStore instance when KVSImplandClass are given: 0ms
Utils #CryptoKeyStore should return a valid CryptoKeyStore instance when none function KVSImplandClas ✓ Utils #CryptoKeyStore should return a valid CryptoKeyStore instance when none function KVSImplandClass is given: 1ms
✓ Utils #CryptoKeyStore._getKeyStore should return a promise to the this._store: 0ms
✓ Utils #CryptoKeyStore._getKeyStore should return a promise to the this._store if this._store is set: 0ms
✓ Utils #CryptoKeyStore._getKeyStore should throw an error if CKS rejects a promise: 0ms
✓ Utils #newCryptoKeyStore should create a new instance of CryptoKeyStore: 1ms
✓ Utils #checkAndAddConfigSetting should reutrn a list of return options: 0ms
✓ Utils #checkAndAddConfigSetting should return the default value when no options passed in: 0ms
✓ Utils #normalizeX509 should throw an error if string doesnt match pattern: 0ms
✓ Utils #normalizeX509 should match with a valid certificate: 0ms
✓ Utils #pemToDER should throw an error if a pem does not match: 0ms
✓ Utils #pemToDER should encode a valid certificate: 0ms
✓ Utils #convertToLong should throw an error if value is not set: 0ms
✓ Utils #convertToLong should throw an error if value is not a number: 1ms
✓ Utils #convertToLong should return the Long value: 0ms
✓ Utils #convertToLong should return the Long value: 0ms
✓ Utils #convertToLong should return the Long value: 1ms
✓ Utils #checkIntegerConfig should throw an error if config value is not an integer: 0ms
✓ Utils #checkIntegerConfig should return true if the value is valid: 0ms
✓ Utils #checkIntegerConfig should return false if the config value is not found in opts: 0ms
✓ ChannelHelper #buildTransactionProposal should return the payload: 1ms
✓ BasePackager #constructor should throw if instance created: 0ms
✓ BasePackager #constructor should throw an error if package isnt overriden: 0ms
✓ BasePackager #package should throw a TypeError: 0ms
✓ BasePackager #package should throw a TypeError: 0ms
✓ BasePackager #findSource should throw an error: 1ms
✓ BasePackager #findSource should throw an error: 0ms
✓ BasePackager #findMetadataDescriptors should throw an error and log: 1ms
BasePackager #findMetadataDescriptors should resolve after recieving data and end being called when e ✓ BasePackager #findMetadataDescriptors should resolve after recieving data and end being called when entry is a file and contains metadata: 1ms
✓ BasePackager #findMetadataDescriptors should resolve after recieving data that isnt a file: 1ms
✓ BasePackager #isMetadata should return true if the file is a json file: 0ms
✓ BasePackager #isMetadata should return false if the file is not a json file: 1ms
✓ BasePackager #isSource should return true if the file format is in keep: 0ms
✓ BasePackager #isSource should return false if the file format is in keep: 0ms
✓ BasePackager #packEntry should throw an error if fs reads nothing: 1ms
✓ BasePackager #packEntry should reject with error if pack.entry callback has an error: 0ms
✓ BasePackager #packEntry should resolve with true if pack.entry callback does not have an error: 0ms
✓ BasePackager #generateTarGz should reject with error if on error is called: 0ms
✓ BasePackager #generateTarGz should resolve with true: 0ms
✓ BasePackager #generateTarGz should throw an error if a task promise is rejected: 0ms
✓ BasePackager #generateTarGz should resolve all promises and call finalize: 0ms
✓ Car #package should log and return the file: 0ms
✓ Golang #package should return the package when given the metadata path: 0ms
✓ Golang #package should return the package when not given the metadata path: 0ms
✓ Golang #findSource should throw an error: 1ms
✓ Golang #findSource should return a list of descriptors and log each one added: 1ms
✓ Golang #findSource should not add a descriptor if entry is not a file: 1ms
✓ Java #package should return the package when given the metadata path: 0ms
✓ Java #package should return the package when not given the metadata path: 0ms
✓ Java #findSource should return a list of descriptors if files are returned: 0ms
✓ Java #findSource should return a list of descriptors if no files are returned: 0ms
✓ Node #package should return the package when given the metadata path: 0ms
✓ Node #package should return the package when not given the metadata path: 1ms
✓ Node #findSource should return a list of descriptors if files are returned: 0ms
✓ Node #findSource should return a list of descriptors if no files are returned: 0ms
1116 passing (2s)
2 failing
1) Orderer
#constructor
should not permit creation without an url:
AssertionError: expected [Function] to throw error matching /Parameter "url" must be a string, not undefined/ but got 'The "url" argument must be of type string. Received type undefined'
at Context.it (fabric-client/test/Orderer.js:44:19)
2) Peer
#constructor
should not permit creation without an url:
AssertionError: expected [Function] to throw error matching /Parameter "url" must be a string, not undefined/ but got 'The "url" argument must be of type string. Received type undefined'
at Context.it (fabric-client/test/Peer.js:41:19)
[11:26:39] 'mocha-fabric-client' errored after 4.36 s
[11:26:39] Error in plugin "gulp-mocha"
Message:
There were test failures
[11:26:39] 'run-test-headless' errored after 14 s
[11:26:39] Error in plugin "run-sequence(mocha-fabric-client)"
Error
at finish (/home/antonio/code/test/fabric-sdk-node/node_modules/run-sequence/index.js:82:12)
at Gulp.onError (/home/antonio/code/test/fabric-sdk-node/node_modules/run-sequence/index.js:93:3)
at Gulp.emit (events.js:185:15)
at Gulp.Orchestrator._emitTaskDone (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/index.js:264:8)
at /home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/index.js:275:23
at finish (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/lib/runTask.js:21:8)
at DestroyableTransform.<anonymous> (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/lib/runTask.js:52:4)
at DestroyableTransform.f (/home/antonio/code/test/fabric-sdk-node/node_modules/once/once.js:17:25)
at DestroyableTransform.emit (events.js:180:13)
at proc.then.catch.err (/home/antonio/code/test/fabric-sdk-node/node_modules/gulp-mocha/index.js:69:10)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:182:7)
[11:26:39] 'run-test-mocha' errored after 5.71 s
[11:26:39] Error in plugin "run-sequence(run-test-headless)"
Error
at finish (/home/antonio/code/test/fabric-sdk-node/node_modules/run-sequence/index.js:82:12)
at Gulp.onError (/home/antonio/code/test/fabric-sdk-node/node_modules/run-sequence/index.js:93:3)
at Gulp.emit (events.js:185:15)
at Gulp.Orchestrator._emitTaskDone (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/index.js:264:8)
at /home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/index.js:275:23
at finish (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/lib/runTask.js:29:3)
at finish (/home/antonio/code/test/fabric-sdk-node/node_modules/run-sequence/index.js:86:4)
at Gulp.onError (/home/antonio/code/test/fabric-sdk-node/node_modules/run-sequence/index.js:93:3)
at Gulp.emit (events.js:185:15)
at Gulp.Orchestrator._emitTaskDone (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/index.js:264:8)
at /home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/index.js:275:23
at finish (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/lib/runTask.js:21:8)
at DestroyableTransform.<anonymous> (/home/antonio/code/test/fabric-sdk-node/node_modules/orchestrator/lib/runTask.js:52:4)
at DestroyableTransform.f (/home/antonio/code/test/fabric-sdk-node/node_modules/once/once.js:17:25)
at DestroyableTransform.emit (events.js:180:13)
ERROR: Coverage for lines (72.5%) does not meet global threshold (85%)
ERROR: Coverage for functions (82.22%) does not meet global threshold (91%)
ERROR: Coverage for branches (66.65%) does not meet global threshold (80%)
ERROR: Coverage for statements (72.52%) does not meet global threshold (85%)
---------------------------------|----------|----------|----------|----------|-------------------|
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---------------------------------|----------|----------|----------|----------|-------------------|
All files | 72.52 | 66.65 | 82.22 | 72.5 | |
fabric-ca-client/lib | 100 | 99.02 | 100 | 100 | |
AffiliationService.js | 100 | 100 | 100 | 100 | |
IdentityService.js | 100 | 100 | 100 | 100 | |
helper.js | 100 | 95 | 100 | 100 | 67 |
fabric-client/lib | 80.72 | 78.74 | 92.15 | 80.72 | |
BaseClient.js | 100 | 100 | 100 | 100 | |
BlockDecoder.js | 100 | 100 | 100 | 100 | |
CertificateAuthority.js | 100 | 100 | 100 | 100 | |
Channel.js | 42.53 | 38.61 | 66.12 | 42.49 |... 4084,4086,4088 |
ChannelEventHub.js | 99.18 | 99 | 100 | 99.18 |... 12,413,547,548 |
Client.js | 100 | 99.76 | 100 | 100 | 162 |
Config.js | 100 | 100 | 100 | 100 | |
Constants.js | 100 | 100 | 100 | 100 | |
Orderer.js | 100 | 100 | 100 | 100 | |
Organization.js | 100 | 100 | 100 | 100 | |
Package.js | 100 | 100 | 100 | 100 | |
Packager.js | 100 | 100 | 100 | 100 | |
Peer.js | 100 | 95 | 100 | 100 | 74,79 |
Policy.js | 100 | 93.88 | 100 | 100 | 81,171,191 |
ProtoLoader.js | 100 | 100 | 100 | 100 | |
Remote.js | 100 | 100 | 100 | 100 | |
SideDB.js | 95.59 | 90 | 100 | 95.59 | 121,122,124 |
TransactionID.js | 100 | 100 | 100 | 100 | |
User.js | 100 | 95 | 100 | 100 | 61,175,225 |
api.js | 100 | 100 | 100 | 100 | |
client-utils.js | 100 | 100 | 100 | 100 | |
hash.js | 100 | 100 | 100 | 100 | |
utils.js | 89.41 | 87.9 | 94.29 | 89.41 |... 59,561,563,566 |
fabric-client/lib/impl | 21.42 | 14.22 | 22.22 | 21.42 | |
BasicCommitHandler.js | 15 | 0 | 60 | 15 |... 31,134,135,137 |
CryptoSuite_ECDSA_AES.js | 22.46 | 12.64 | 5.26 | 22.46 |... 46,347,348,350 |
DiscoveryEndorsementHandler.js | 5.05 | 0 | 15 | 5.05 |... 17,518,519,522 |
FileKeyValueStore.js | 18.92 | 0 | 0 | 18.92 |... 81,82,83,84,86 |
NetworkConfig_1_0.js | 42.13 | 27.53 | 47.37 | 42.13 |... 25,426,428,429 |
fabric-client/lib/impl/ecdsa | 15.87 | 0 | 0 | 15.87 | |
key.js | 15.87 | 0 | 0 | 15.87 |... 83,190,191,193 |
fabric-client/lib/msp | 39.53 | 15.19 | 33.33 | 39.53 | |
identity.js | 37.04 | 12.12 | 30.77 | 37.04 |... 32,235,236,240 |
msp-manager.js | 42.31 | 18.18 | 57.14 | 42.31 |... 52,154,155,158 |
msp.js | 39.39 | 16.67 | 20 | 39.39 |... 64,166,168,179 |
fabric-client/lib/packager | 100 | 100 | 100 | 100 | |
BasePackager.js | 100 | 100 | 100 | 100 | |
Car.js | 100 | 100 | 100 | 100 | |
Golang.js | 100 | 100 | 100 | 100 | |
Java.js | 100 | 100 | 100 | 100 | |
Node.js | 100 | 100 | 100 | 100 | |
fabric-client/lib/utils | 100 | 100 | 100 | 100 | |
ChannelHelper.js | 100 | 100 | 100 | 100 | |
---------------------------------|----------|----------|----------|----------|-------------------|
=============================== Coverage summary ===============================
Statements : 72.52% ( 4364/6018 )
Branches : 66.65% ( 1747/2621 )
Functions : 82.22% ( 592/720 )
Lines : 72.5% ( 4361/6015 )
================================================================================
[11:26:39] 'test-headless' errored after 16 s
[11:26:39] Error in plugin "gulp-shell"
Message:
Command `npx nyc gulp run-test-headless` failed with exit code 1
npm ERR! Test failed. See above for more details.
✘ antonio@xps  ~/code/test/fabric-sdk-node   release-1.4 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment