Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mojaloop/#2809): merge local end to end func tests (#398)
* updated deps * docker compose for end-end testing * updated dependencies * updates to end-end docker compose * added docker compose for local testing * added local-testing folder * test case for bulk quote accept event * Refactored the func test files and p2p is working * running tests to check they are working * chore: added sample ttk env file * chore: updated sdk-out api in TTK func test framework * fix * fix * added kafka related env vars * removed duplicate env vars * fix: func-tests-kafka-consumer-group-config * chore: maintenance - removed build from git commit hooks - added updated api.yaml which was generated from yarn run build (no idea why this was not updated?) * re-aligned bulkTransaction states to match sequence diagram * chore: maintenance - changed redis default config to localhost * feat(mojaloop/#2803): sdk scheme adapter - add bulk transfers calls (Steps 62-85) - added the following Events: - ProcessSDKOutboundBulkTransfersRequestCmdEvt - BulkTransfersRequestedDmEvt - added processing logic on the Command Handler for - processing ProcessSDKOutboundBulkTransfersRequestCmdEvt - sending BulkTransfersRequestedDmEvt * fix: ttk-func-config * fixes for docker-compose - moved redisinsight to debug profile - rename insight to redisinsight - removed unnecessary mongodb dependency (no idea why that was there) * TTK test cases for bulk - initial commit * feat: added put bulktransactions to mojaloop sim api in TTK * chore: added some sample code * chore: some ttk rules changes * removed ttk for bulk * updated repos to include bulkTransfersCount* methods and keys * updates for story - added ProcessSDKOutboundBulkTransfersRequestHandler to handler/index - added get counts for transfers to bulkAggregate * refactored aggregate for createBatches logic - refactored createBatches to a private _generateBatchMapArray method which separates out the logic to create the BatchMapArray to a re-usable function that supports filters - added a new method generateBulkQuoteBatches which calls the _generateBatchMapArray and implements the previous logic to adds the individual Quotes * clean up * added bulkTransactionAgg.generateBulkTransferBatches method and did some cleanups * typo fixes * added redis insights to docker compose * initial commit for bulk transfers intg tests * feat(mojaloop/#2802): rework ProcessBulkQuotesCallback logic and add int tests for bulk quotes (#366) * feat: add tests for bulk quotes * chore: more * chore: format * chore: lock * chore: cleanup * chore: dep test * chore: file dep test * chore: dep and bug fix * chore: address comments * chore: address more comments * chore: add assert * chore: changes * chore: add assertion * chore: revert * chore: shorthand * chore: remove unnecessary asserts * chore: update logic * chore: update tests * chore: time * chore: timeout * chore: update logic * end-end testing diagram * fixes for generators for bulk Quotes and Transfers - cleaned up code - made the generateBatch methods for Quotes/Transfers to be cleaner with some additional debug methods - added sample event generator for integrationTests for processSDKOutboundBulkTransfersRequestCmdEvt * added todo comment * fixes for transfers/quotes counts and added todo * lint fixes * updates to code headers * folder restructure for tests * refactor folders for discovery integration tests * updated bulk ttk test case * changed mvp bulk testcase * fixed ttk rule * fix for mvp branch merges * aligned transferId to bulkTransferRequests to use the individualTransfers.id * chore: add bulk transfer lib event boiler plate code * renamed files * fix for mvp branch merges - fixed paths to be more generic - updated jest confit to dynamically pull in the path information to properly resolve imported alias's in test files - added utilities to command handler tests for Timeout async awaits - added SETUP / ACT / ASSERT comments to process_bulk_quotes_callback.test.ts * feat(mojaloop/#2803): sdk scheme adapter added quote accept (Steps 68) - added ProcessSDKOutboundBulkAcceptQuoteHandler - added 'AGREEMENT_ACCEPTED' & 'AGREEMENT_REJECTED' to IndividualTransferInternalState - added ProcessSDKOutboundBulkAcceptPartyInfoCmdEvt - added SDKOutboundBulkAcceptQuoteProcessedDmEvt TODO: - Logic for 'Calculate bulk expiry based on both expirySeconds config and bulkExpiration' * fixed header * updates to docs for auto-numbering * docs: added updated for `AGREEMENT_ACCEPTANCE_COMPLETED` state * Added new states to bulkTransactionEntity - AGREEMENT_ACCEPTANCE_COMPLETED - TRANSFERS_COMPLETED - TRANSFERS_FAILED - RESPONSE_PROCESSING - RESPONSE_SENT * updated handleProcessSDKOutboundBulkAcceptQuoteCmdEvt to set AGREEMENT_ACCEPTANCE_COMPLETED * fix typos * renamed SDKOutboundBulkAutoAcceptQuoteCompleted --> SDKOutboundBulkAutoAcceptQuoteProcessed This aligns with the auto-accept= false use-case * feat(mojaloop/#2803): sdk scheme adapter added quote accept (Steps 68) - added handleSDKOutboundBulkAcceptQuoteProcessed to the Domain Event Handler * feat(mojaloop/#2803): sdk scheme adapter added quote accept (Steps 68) - fixes for SDKOutboundBulkAcceptQuoteReceivedDmEvt - added handleSDKOutboundBulkAcceptQuoteReceived handler to the Domain Handler * chore: updated process_bulk_quotes_callback int-test option params * added more test assertions * renamed test files * feat: added parties error response rule * fix for process_bulk_quotes_callback.test * fix: reworked process_bulk_quotes_callback.test - updated the initial test to meet the correct test conditions - updated the initial test asserts to validate the outcome of the test conditions - added todo comment on original test - re-factored asserts to use Class.name instead of hard-coded name string values * refactored happy path test case and added error test case * typo fixes * fixed typos in process_bulk_quotes_callback.test - fixed test description, added missing 'global BulkTransaction state should be AGREEMENT_ACCEPTANCE_PENDING' to test description * updates to process_bulk_quotes_callback.test - added SETUP, ACT, ASSERT comments * updated header * fixed indentation and moved the //act comment to the correct location * feat(mojaloop/#2803): add event handlers (#380) * feat(mojaloop/#2803): add BulkTransfersRequestedDmEvt implementation and handling * add BulkTransfersCallbackReceived domain handler * chore: key * Update modules/outbound-domain-event-handler/src/application/handlers/bulk_transfers_callback_received.ts Co-authored-by: Miguel de Barros <[email protected]> Co-authored-by: Miguel de Barros <[email protected]> * added timeout error case * Add readme * Added support for ProcessSDKOutboundBulkAcceptQuoteCmdEvt and SDKOutboundBulkAcceptQuoteReceivedDmEvt - Updates to outbound-command-event-handler - added/expanded on some additional logging - added ProcessSDKOutboundBulkAcceptQuoteCmdEvt processing support - Updates to outbound-domain-event-handler - added SDKOutboundBulkAcceptQuoteReceivedDmEvt routing support - * Added initial version of process_sdk_outbound_bulk_accept_quote.test - added first integration test to process_sdk_outbound_bulk_accept_quote.test - added initial impl of generator util helper (this needs allot of work) - updated handleProcessSDKOutboundBulkAcceptQuoteCmdEvt to not update stage if the individualTransfer is already in AGREEMENT_FAILED state * added more error test cases * added more error test cases for bulk quotes * feat: add ProcessBulkTransfersCallback handler * added more error test cases for bulk quotes * working process_sdk_outbound_bulk_accept_quotes.test (but process not finished) * added some additional comments * fixes for outbound-domain-event-handler - fixes to missing imports - fixed formatting issue with application handler * added fetchBulkBatches to generator to help fetch the right bulkBatches * updates for outbound-command-event-handler - added createChild support for loggers to include component name - added new agg handler for handleProcessBulkTransfersCallbackCmdEvt PLACEHOLDER (i.e. impl is missing) with application routing - updated process_sdk_outbound_bulk_accept_quote.test and generator to kick-off the ProcessBulkTransfersCallbackCmdEvt event * added comment to be addressed by Kevin's PR * added more error test cases for bulk quotes that has timeout * fixes for merge issues * added a child Logger for OutboundCommandEventHandlerAPIServer * updated process_sdk_outbound_bulk_accept_quote.test description * cleanup to loggers * updates to outbound-command-event-handler integration tests - refactored generator helper by removing the bulkTransactionRequest, and rather adding a subset of the config options only - re-worked process_sdk_outbound_bulk_accept_quote.test - completed impl the process_bulk_transfers_request.test * added process_bulk_transfers_request.test * removed unused variables * added TODOs to address * adding correct state for individualTransfer that has a failed Quote * updated bulk_transaction_agg with types, and fixed issue with batch generator functions to pass unit tests - added types to getBulk*Count() methods - added validation checks on the generateBulk*Batches() methods to throw an error if batches were already generated - fixed unit tests to match the earlier re-factor for the `createBatches` -> `generateBulk*Batches` methods * updated end-end tests * build and unit test fixes * updated rules for bulk quotes * fixes for integration tests * fixes for build * fixes for missing outbound-domain-event-handler to handler to route SDKOutboundBulkAcceptQuoteProcessedDmEvt events * added bulkQuoteId to bulkTransfersRequest when creating an empty batch by the BulkBatchEntity * updated test scripts for ID not found scenarios * made updates to test scripts * chore: clean up integration tests (#387) * chore: fix discovery int tests * chore: agreement tests * chore: clean up transfers int tests * chore: increment * dep:update for api-snippets - bumped api-snippets - also changed dep:* package.json root scripts to use "static" output to correctly show info on console * added missing ilpPacket and condition to bulkBatch IndividualTransfer * fixes for func-tests - fixed lint issues with test/fun/README.md - added ignore for **/*.env to dockerignore file * same as previous commit * added missing outbound-domain-event-handler routing - BulkTransfersCallbackReceivedDmEvt - SDKOutboundBulkTransfersRequestProcessedDmEvt * feat(mojaloop/#2803): add more event handlers (#383) * feat(mojaloop/#2803): add PrepareSDKOutboundBulkResponse and PrepareSDKOutboundBulkResponseSent handler * chore: fix * chore: header * chore: fix some unit tests * chore: update bulk response * chore: remove unneeded file * added missing routes/implementation to the outbound-domain-event-handler - added routing for SDKOutboundBulkResponseSentDmEvt - added implementation for - handleSDKOutboundBulkTransfersRequestProcessed - handleSDKOutboundBulkResponseSent * added missing routes to outbound-command-event-handler - added route handling for PrepareSDKOutboundBulkResponseCmdEvt - added route handling for ProcessSDKOutboundBulkResponseSentCmdEvt * outbound-command-handler updates to handlePrepareSDKOutboundBulkResponseCmdEvt - added central-services-shared for transferState enums - added missing field mappings on SDKOutboundBulkResponsePreparedDmEvt for quoteResponse, fulfil, and extensions - fixed mapping from bulkTransactionIndividualTransferResult.to to use the partyResponse.party * Updated handleProcessSDKOutboundBulkResponseSentCmdEvt to produce SDKOutboundBulkResponseSentProcessedDmtEvt - Added new domain event SDKOutboundBulkResponseSentProcessed - Added logic to handleProcessSDKOutboundBulkResponseSentCmdEvt to publish event - Updated documentation to include final SDKOutboundBulkResponseSentProcessed Domain event * added comments and skipped an integration test * test: updated mvp-bulk ttk-testcases - updated happy path to validate final state "COMPLETED" * made updates to test scripts * Updated generator help util for integration tests on outbound-command-handler - Added support for : - PrepareSDKOutboundBulkResponseCmdEvt - ProcessSDKOutboundBulkResponseSentCmdEvt * added more tests for transfers * fix: party lookup flow if party info exists (#388) send PartyInfoCallbackReceivedDmEvt if party info exists * fix: party lookup (#389) party lookup fix * updated bulk quotes error test cases * added TC with 50 bulk transfer requests * fix(mojaloop/#2803): adjust transfer creation logic and int tests (#390) * chore: fix discovery int tests * chore: agreement tests * chore: clean up transfers int tests * chore: increment * fix: adjust transfer creation logic and int tests * chore: cleanup * Update modules/outbound-command-event-handler/src/domain/bulk_transaction_agg/index.ts Co-authored-by: Miguel de Barros <[email protected]> * chore: dep update * chore: revert * chore: update ncurc * chore: yaml file Co-authored-by: Miguel de Barros <[email protected]> * updated TC with 50 bulk transfer requests * updated TC with 50 bulk transfer requests * added negative test case for transfers * updated negative test case for transfers * new file for transfer errors * new file for quotes error cases * added new error test case for transfers * restructuring of files * added an error test case for transfers * added more test cases for quotes error cases * updated test cases for quotes * adding happy path * updated rule for quotes error * updated test case numbers * re-arranged test cases * updated dependencies * fix: bugs 2946, 2951 (#391) * fix: bugs 2946, 2951 * fix #2946 * fix #2951 * handle errors * bump deps * fix enums * fix enums * update deps * fix tests * fix tests * fix: ci build order (#393) * new file for transfer errors * new file for quotes error cases * added new error test case for transfers * restructuring of files * added an error test case for transfers * added more test cases for quotes error cases * updated test cases for quotes * fix: ci build order seems to be an issue * deps updated * rebuild yarn.lock * fix for unit tests * added private-shared-lib to api-svc Co-authored-by: Sridevi Miriyala <[email protected]> * fix party resolution. * update e2e tests * fix audit issues * update circleci machine image * update circleci machine image * clear event listener in redis mock * fix tests Co-authored-by: Miguel de Barros <[email protected]> Co-authored-by: Sridevi Miriyala <[email protected]> * fix: unit tests (#397) close active event emitters * fix handling quote error response * updated happy path test case * fix handling quote error response * updated test cases * updated quotes test cases * fix assigning transactionId * added test cases markdown * updated test cases markdown * updated test cases markdown * updated test cases markdown * updated test cases markdown * chore: fix int tests (#399) * chore: try fix tests * chore: regen lock * chore: dep update Co-authored-by: Vijay Kumar <[email protected]> Co-authored-by: Miguel de Barros <[email protected]> Co-authored-by: Kevin Leyow <[email protected]> Co-authored-by: Yevhen Kyriukha <[email protected]>
- Loading branch information