forked from hyperledger-cacti/cacti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(connector-fabric-socketio): add functional test, bug fix
Added functional jest test fabric-socketio-connector.test that can be run during CI process. It checks evaluate/sending transactions and monitoring for new events. Connector had to be refactored to be testable, tests also discovered some bugs that had to be fixed in order to pass. SocketIOApiClient refactors: - Added option for supplying validatorKeyValue instead of validatorKeyPath. - JWT validation function works with key value now (instead of reading the key). - Validator can now return messages that are not encrypted (it throwed error previously). - Adjusted unit tests. connector-fabric-socketio refactors: - Connector can be run both as a standalone app and loaded as a module (www.js file). Caller can use exported startFabricSocketIOConnector function to run the connector. Configuration must be supplied in file or in env variable like it's done in functional test. - All cryptographic data (keys, certificates, etc…) can now be supplied as a value (previously it supported only path to a file). - sendSignedTransaction can now be called synchronously (it had wrong response format before). - Fixed a bug introduced during my last changes in this component, which caused fabric-client session to be disconnected but still reused by follow-up requests. I didn't know that gateway disconnects client it operates on. - Increased JWT expiration to 15 minutes to prevent constant JWT expiration error (I'm pretty sure 15 minutes is still secure period). - Minor improvements (logging, formatting, etc…) fabric-test-ledger-v1 changes: - Added adminCredentials to have programatic access to admin credentials on currently used ledger (unlikely, but can change in the future). Depends on: hyperledger-cacti#1975 Closes: hyperledger-cacti#1976 Signed-off-by: Michal Bajer <[email protected]>
- Loading branch information
Showing
17 changed files
with
1,049 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.