-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test(connector-fabric-socketio): add functional test, bug fix #1976
Labels
enhancement
New feature or request
Comments
outSH
added a commit
to outSH/cactus
that referenced
this issue
Apr 15, 2022
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]>
outSH
added a commit
to outSH/cactus
that referenced
this issue
Apr 19, 2022
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]>
outSH
added a commit
to outSH/cactus
that referenced
this issue
May 11, 2022
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]>
outSH
added a commit
to outSH/cactus
that referenced
this issue
May 19, 2022
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]>
outSH
added a commit
to outSH/cactus
that referenced
this issue
May 27, 2022
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]>
petermetz
pushed a commit
that referenced
this issue
May 28, 2022
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: #1975 Closes: #1976 Signed-off-by: Michal Bajer <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add a functional test to
connector-fabric-socketio
so it's operations can be checked in CI. Refactor the connector to improve testability, fix any bugs that are revealed by the tests.The text was updated successfully, but these errors were encountered: