Skip to content
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

3.3.0-snapshot #107

Closed
wants to merge 29 commits into from
Closed

3.3.0-snapshot #107

wants to merge 29 commits into from

Conversation

mdebarros
Copy link
Member

No description provided.

rmothilal and others added 27 commits April 11, 2018 17:15
* Incorporate all historical changes to align with mojaloop.

* Tested locally with provided scripts - passed
Tested with Postman - passed
To be fixed: Credentials on tests for SMTP

* Fixed Emailing test with a valid user

* fixes for unit test issues

* re-added sidecar enabled

* fixes and updates to tests and package

* fixes for functional tests

* fixing unit tests, stubbing smtp server

* settlement coverage

* unit testing for settlements and csv

* removed console.logs

* code working except for test

* fixes for some tests

* updates for validation working

* fixing reorder

* reverting

* fix file path

* added updated config.yml script

* testing

* unit test fixes and changes. coverage failing

* fixes for coverage tests only setup.js left now

* fixes for docker version and updated onboarding doc

* removing fs-extra

* reverting default json for sidecar

* Fix src/setup/setup.js tests

* changes for POC DB #75

* updated code for functional tests and integration tests

* files for integration and functional tests

* fixes for testing

* sodium build issues

* issues with sodium

* removed global install of sodium and argon which is breaking circleci build. build is currently cached so it may break again because of cache

* version upgrade

* added local install of tape and tap-xunit to config.yml and test.dockerfile

* version change so that cache refreshes

* dependency issue for tape and tap-xunit

* added tape and tap-xunit for test.docker file back for testing to pass

* Completed the migration scripts conversion from Postgress to mySql syntax.
ran scripts and checked the tables in the database

* Additional fixes needed to NPM start with the Mysql changes

* Fix for default value issue in user credential account.
Fixes for Foreign key constraints

* Fix unit test that was failing

* Fix prepare transfer issue when running Postman script

* Fix issues with JSON stringify and date time stamp to conform to Mysql and fixed test cases

* changes to remove eventric code from system rajiv to pick up

* fixes for settlements and fulfillment, fees now get added correctly and is settle with transfers

* fixed issues for rejected transfers

* updated node version to use newer version as new frameworks used

* Add email address validator to "accounts post" in Admin

* updated code to implement mysql db poc as well as removed eventric code
…ndon (#58)

* Re-aligned circleci2.0 config to k8s-london
1. added support for token authorization
2. added support for selecting a chart version
3. updated helm install/update to correctly check for existing helm installation
4. cleaned up config
5. fixed bug on helm update where one MUST include the original value file to correctly merge value changes
6. fixed typos in integration & functional tests in config

* Fixed the following issues:
1. Integration Test Command now does not cat, thus returns proper result code (0 - success, >0 - failure)
2. Integration script re-worked to properly handle failure case
3. updated nvmrc to the version of node that we are using

* fixed typoe in node version in nvmrc
* migrations by Georgi

* migrations by Nikolay

* Migrations by Nikolay (fix fsp to participant)

* Migrations by Nikolay (fix the migration timestamp)

* valentin's migrations

* Renaming files with latest timestamps

* Cleaning out old migration scripts

* Migrations by Deon

* cleaning up

* Merging migration scripts 1

* Merging migration scripts 2

* Merging migration scripts 3

* Fixing migration scripts

* Rename migrations to singular

* renaming topic to event

* Temporary disable Ledger account creation

* Finalize CDM changes
* migrations by Georgi

* migrations by Nikolay

* Migrations by Nikolay (fix fsp to participant)

* Migrations by Nikolay (fix the migration timestamp)

* valentin's migrations

* Renaming files with latest timestamps

* Cleaning out old migration scripts

* Migrations by Deon

* cleaning up

* Merging migration scripts 1

* Merging migration scripts 2

* Merging migration scripts 3

* Fixing migration scripts

* Rename migrations to singular

* renaming topic to event

* Temporary disable Ledger account creation

* Finalize CDM changes

* transfers renamed

* users -> party

* fews -> few

* before accounts

* changed the currency table accordingly and seeded the currency codes

* currencies with names added to seed script

* trying to make it work

* fixed permissions
* changed the currency table accordingly and seeded the currency codes

* currencies with names added to seed script
* #210 - transfer settlement batch table updated V1.0.3

* #210 - transfer settlement batch table updated V1.0.4

* #210 - transfer settlement batch table updated V1.0.5
* changes for registering consumers

* added for multiple handlers per functionality or a single handler

* fixes for prepare stream processing

* handler registration for kafka topics

* handlers and routes added for kafka consumer handlers

* file missing

* neatening of code to standards for error handling

* License agreement added

* align naming conventions and coding standards

* all documentation added and outstanding error handling

* Updated documentation

* Feature/#211 participants (#66)

* WIP

* admin/participants is working

* seeds back to normal

* following the new code standards into the participant module

* some errors fixed and some tests also

* Fixed migration scripts to work with UTF8MB4

* Fixed migration scripts to work with UTF8MB4 (#67)

* updated transfer migration scripts

* onboarding doc

* updated transfer projection to correctly join the transfer and transferStateChange

* updated transfer projection to correctly join the transfer and transferStateChange

* updated migration scripts as per discussion for v6 of ERD

* updated migration scripts as per discussion for v6 of ERD

* updated migration scripts as per discussion for v6 of ERD

* fixed seeds and migration conflicts

* Feature/#211 implement data access layer required for prepare handler (#69)

* Fixed migration scripts to work with UTF8MB4

* updated transfer migration scripts

* updated transfer projection to correctly join the transfer and transferStateChange

* updated transfer projection to correctly join the transfer and transferStateChange

* updated migration scripts as per discussion for v6 of ERD

* updated migration scripts as per discussion for v6 of ERD

* updated migration scripts as per discussion for v6 of ERD

* fixed seeds and migration conflicts

* Several updates for transgers, ilp and transferstatechange

1. projection for transfers now correctly inserts transfer, ilp and transferStateChange into DB
2. updated states
3. moved ilp model to generic model folder

* 1. projection for transfers to handled extensions, and also updated the translator to correctly mape the transferreadmodel to mojaloop schema

* added missing completedTimestamp from transfer message in transferReadModel and saveTransferPrepare, added transfer translator support for saveTransferPrepare

* updated changes for preparehandler from kafka

* updated model for transferStates, and created an integration test

* consumer not working

* Schema validation function 

Added a function to validate payload against schema

* fixed starting issue and added npm run for handlers

* fixed issues with the consumers consuming null messages

* changes for the prepare handler
Fix all query files to database and fix for consumer passing null
fix for consumer not committing messages
and other things

* changes for prepare handler, having negative cases and handling accordingly
added code to retrieve all participants from database and get names and dynamically create topics
commented and cleaning up code

* code updated to include create producer template where it is called with the messageProtocol, topic config and kafka config which can now be gotten dynamically

* neatening code

* changes for notifications seems to have created more issues

* changes

* added changes for notification producer not working

* hack to register notification topic

* committing package version change

* fix path of mojaloop-services-shared

* fixed seed start on npm start issue

* fixed seeds path

* changes to test producer code

* Tweaked some stuff.

* WIP tests

* participant unit test finished

* Commit initial program changes for Transfer handler

* integration and coverage of participants

* changes for making producer creation more dynamic

* positive unit tests done the proper way

* Added Transfer object to default,json and transfer object to the handler

* Added code comments

* added testPI2 folder

* Added event Dao code and changes to the event handler as reviewed by Rajiv

* participant integration tests working fine

* Added final code changes to handler.js as well as code to consume message and send notification as to Miguel's new design

* unit tests for participants done

* integration tests for ilp

* Added code to test producer

* added files for unit tests

* Remove unused code (method : CreateTransferHnadler)

* extensions unit done

* Added unit test (Happy lines) for Projections.js

* transferStateChange Unit test done

* unit tests for ilp, unit tests for transferState, fixing some issues

* unit tests for ilp, unit tests for transferState, fixing some issues

* Added more test code (Unhappy Line)

* Added more testing (Unhappy Lines)

* added integration helper modules for inserting data into database

* unit tests for the prepare

* Added last Negative tests to saveTransferPrepared

* Add happy line testing : saveTransferRejected

* updated tests

* validation tests passing

* added more tests

* added test for dao

* Increased code coverage by removing un necessary exception handling statements

* exclude testPI2 folder from test results

* WIP integration helper

* commenting unused methods about transfer table, fixing call methods for inserting transfer row

* Added negative testing to saveTransferRejected

* Add test file testP12/unit/domain/transfer/commands/index

* transfer unit test WIP

* utility tests created

* added dummy test for notifications coverage neatening up of code to standards

* fixing standards

* Add test scripts for index

* changes added register all handlers on start of API server

* added setup test

* added tests for the routes and plugins

* Add more code for happy line testing

* tests almost complete

* completed tests

* transfer unit tests WIP

* Add 'save transfer prepared throws error' test and changed exception handling in the index.js file

* Added reject happy line testing code

* Finish commands.index unit tests

* Started with transfer.index unit test

* Added transfer.index prepare happy line test

* Added unhappy line testing for transfer.index

* Added unhappy line testing to transfer.index unit test

* fixed object for transfer

* Added position handler funtionality

* integration tests for ilp, fixes on some models, services and other minor bugs

* Added unit tests

* Updated unit test

* transfer unit finished

* Added new tests cases

* added working integration scripts for PI2 test

* integration test for extension and some minor fixes

* Fixed comments from review

* added functionality to run through prepare, position and transfer

* fixed issue that the docker build command was commented out in the integration-runner.sh

* integration test not working

* testing sinon callback issue

* testing sinon callback issue

* working integration tests using DB inspection

* test

* fixing standards issues

* notification tests updated

* added missing tests for coverage

* integration for transferStateChange done

* fixed some problems

* integration test done as well

* removal of unused code

* refactor of fulfill British standard fulfil
added position handler for fulfil path and added new tests for coverage

* updated to suggested changes by miguel

* default.json

* Added a "network" to the Integration Test script runner to resolve connectivity to Kafka

* Disabled functional tests until they are implemented

* Disabled functional tests until they are implemented

* will reset

* changed to false

* fixed issues with integration test due to miss-aligned config

* updated config for removal of auto commit

* fixed issues with integration test due to miss-aligned config
* Fulfil handler commit implementation
* Unit tests
* Integration tests
* testProducer upgraded to produce prepare&commit without restart
Added missing foreign key constraint
* Added Unhappy line test to improve code coverage

* transfer model integration done, fixed bug in the model, fixed the unit test accordingly

* extension coverage 100%

* Fulfil handler commit implementation

* TODO: FiveBellsCondition.fulfillmentToCondition comment changed

* Added destroyByName method's happy and Unhappy line Unit tests, Code coverage is now 100% on participant/model.js

* Unit tests for fulfil success

* Merge vgenev feature/#248

* Starting to add unhappy lines on transferstatechange read-model-test.js to increase code coverage

* Repair new Error and run /integration tests

* Added more unhappy line integration tests

* Restore sidecar-enabled and keychain-admin_secret

* Ja and some more still

* added final unhappy lines , code coverage 100% for read-model.test.js

* improvement of the coverage for ilp

* Integration tests for Fulfil Commit Success

* improvement of the coverage for transferState

* Added unhappy line integration test (get All method) on participant/index.test.js

* Final chnages code coverage 100% on integration tests for participant/index.test.js

* remove unnecessary ilp

* ilp cleaned and tested

* all test coverage 100%

* added license info

* removed some commented code and added license to the transfer-read-model also

* removed some commented code and added license to the transfer-read-model again

* removed commented out code and fixed some merge issues

* merged

* worked on Georgi remarks
…ave manually added it. (#74)

* It would seem that the build-dependencies no longer includes git. I have manually added it.
* Fixed issues with the docker files
* added jsdocs config and updated documentation to create webpage

* updated methods to functions

* updated documentation files

* ignore docs folder on commit

* fixes for pi2 demo

* fixes

* optional dependency

* fixes for tests and error messages

* incorrect error message used

* Aligned crypto-condition validation check based on Mojaloop specification

* Moved Fulfil Condition validation to a function, and fixed logic issue with validateFulfilCondition

* Added some comments for the validateFulfilCondition logic

* Added branching logic for TransferPrepare.transfer handler

* fixes for integration test failures
* update version to 2.4.0-snapshot for completed PI2
* Updated based on pre-PI3-design workshop for positionns

* Removed "partyRoleId" from the alter table script for indexes
* Temp sidecar and token fix
* Delete deprecated and update first 3 scripts
* Migration scripts 9-11
* Migration scripts 12-14
* Migration scripts 15-16
* Migration scripts 22-24
* Migration scripts 17-21
* Migration scripts 17-21
* Migration scripts 17-21
* Migration scripts 25-27
* Migration scripts 34 and review fixes to ilpPacket
* Migration scripts 29
* fixed ilpCondition spelling error
* Migration scripts 31
* Migration scripts 28, 30
* Migration scripts 32-33
* Corrections and cleanup
* npm run migrate FIXES
* Fix /participant; Remove /charge, /party, /role, /fee
* Refactor: Move from domain to model & camelCase
* domain/transfer/models to models/transfer, seeds
* Changed transfer facade getById
* Transfer Prepare
* Transfer Commit
* Pre- tests clean
* Test files maintenance
* Additional clean up
* added unit test cases
* fixed dependancies into few tests
* Adding placeholder unit test files
* Fixed admin/index.js unit test
* Added tests for transferFulfilment and transferParticipant
* Tests for transferFulfilment
* Sinon.createSandbox
* Unit testing for transferExtension
* added test cases
* Unit tests for ilpPacket
* Unit tests for transfer/facade init - WIP
* added test cases
* fixes for tests and tweaks (#1)
* merged projections
* merged projections second attempt
* Feature/db model changes georgi (#2)
* fixes for tests and tweaks
* removed unused test and fixed position test
* some fixes but still broken tests
* Standard fixes
* Disable failing test scripts
* projection fixed
* deleted transform.test.js
* unit/models/transfer/facade.test.js
* fixed testPI2/unit/domain/participant/index.test.js
* testPI2/unit/handlers/transfers/handler.test.js
* unit/handlers/transfers/handler.test.js
* Integration tests fix Part 1
* Fix & merge rmothilal
* Disable broken integration tests
* Feature/db model changes georgi (#5)
* fixes for tests and tweaks
* removed unused test and fixed position test
* some fixes but still broken tests
* fixes for producer and consumer. need to test properly
* add producer to list
made some addons
* updated dependencies
* Feature/db model changes georgi (#3)
* fixes for tests and tweaks
* removed unused test and fixed position test
* some fixes but still broken tests
* fixes for producer and consumer
* add producer to list
* updated dependencies
* positions model layer
* updating migration scripts to new knex standards for table creation
* disconnect topicName
* Feature/#355integrations
@vgenev integration tests fixes
* Cleaning up code and renaming integration test file names
* Changes according to rmothilal PR review
* Add ABORTED transferState seed
* transferEventTypes and transferEventActions
* Expand PositionHandler
* Add unit tests and ensure 100% test coverage of handler.js
* Handlers fix
* PR fixes suggested by rmothilal
* integration-config.json
* story #351 changes

* changes requested in PR review

* merged latest code from develop-PI3

* changed suggested in PR review
* added limit and initial position

* added the check for existing participant limit and position

* added the unit tests

* added the integration tests

* fixed some coverage tests

* fixed some coverage tests
* Hotfix for mojaloop/project#370. Updated Producer factory disconnect function to correctly function against singleton factory pattern. Also fixed Unit and Integration tests.

* Fixed code coverage for Producer

* Removed unnecessary commented out code
…#96)

* PositionHandler::positions::commit
* Avoid knex version warning: http://knexjs.org/#Schema-timestamps
* Fixing minor bugs
* .then to await
* Fulfil reject scenario
* Move projection to facade transaction
* Unit tests batch 1
* Transfer facade unit test coverage 100 percent
* Position facade unit test coverage 100 percent
* Inserting placeholders for integration tests
* refactored the integration tests for testPI2/integration/domain/participant/index.test.js (#7)
* Integration test handlers reworked
* Updated registerHandler functions for positions and prepare to allow for specific registration of FSPs (#8)
* Updated registerHandler functions for positions and prepare to allow for specific registration of FSPs
* Removed comment and fixed jsdoc param name
* handlers integration test additions
* integration tests additions
* Finilizing integration tests work
* added unit tests (#9)
* seeds and domain/participant 100
* Adding more unit tests to improve coverage
* Reduce wait time during unit testing for time.js
* Enable sidecar and auth keychain
* Disable dev seed
* Changes as per request by rmothilal
* Add random data generation and SQL code for selecting expired v.1
* Move randomTransers code to util/
* added the GET and POST API for participant limits

* added unit test cases

* formatting changes

* added more unit test cases

* added the integration tests

* coverage is 100%

* modified the result of GET limits to match with POST

* corrected the spelling mistake in the function name

* corrected another spelling mistake

* added check for limit exists or not

* added the return value for adjustLimits

* added more coverage tests

* changed the output of post
* Temp sidecar and token fix

* Delete deprecated and update first 3 scripts

* Migration scripts 9-11

* Migration scripts 12-14

* Migration scripts 15-16

* Migration scripts 22-24

* Migration scripts 17-21

* Migration scripts 17-21

* Migration scripts 17-21

* Migration scripts 25-27

* Migration scripts 34 and review fixes to ilpPacket

* Migration scripts 29

* fixed ilpCondition spelling error

* Migration scripts 31

* Migration scripts 28, 30

* Migration scripts 32-33

* Corrections and cleanup

* npm run migrate FIXES

* Fix /participant; Remove /charge, /party, /role, /fee

* Refactor: Move from domain to model & camelCase

* domain/transfer/models to models/transfer, seeds

* Changed transfer facade getById

* Transfer Prepare

* Transfer Commit

* Pre- tests clean

* Test files maintenance

* Additional clean up

* added unit test cases

* fixed dependancies into few tests

* Adding placeholder unit test files

* Fixed admin/index.js unit test

* Added tests for transferFulfilment and transferParticipant

* Tests for transferFulfilment

* Sinon.createSandbox

* Unit testing for transferExtension

* added test cases

* Unit tests for ilpPacket

* Unit tests for transfer/facade init - WIP

* fixes for tests and tweaks

* added test cases

* fixes for tests and tweaks (#1)

* removed unused test and fixed position test

* some fixes but still broken tests

* merged projections

* merged projections second attempt

* Feature/db model changes georgi (#2)

* fixes for tests and tweaks

* removed unused test and fixed position test

* some fixes but still broken tests

* Standard fixes

* fixes for producer and consumer. need to test properly

* add producer to list
made some addons

* Disable failing test scripts

* projection fixed

* deleted transform.test.js

* updated dependencies

* unit/models/transfer/facade.test.js

* fixed testPI2/unit/domain/participant/index.test.js

* testPI2/unit/handlers/transfers/handler.test.js

* unit/handlers/transfers/handler.test.js

* Feature/db model changes georgi (#3)

* fixes for tests and tweaks

* removed unused test and fixed position test

* some fixes but still broken tests

* fixes for producer and consumer

* add producer to list

* updated dependencies

* positions model layer

* Integration tests fix Part 1

* Fix & merge rmothilal

* Disable broken integration tests

* updating migration scripts to new knex standards for table creation

* Feature/db model changes georgi (#5)

* fixes for tests and tweaks

* removed unused test and fixed position test

* some fixes but still broken tests

* fixes for producer and consumer. need to test properly

* add producer to list
made some addons

* updated dependencies

* Feature/db model changes georgi (#3)

* fixes for tests and tweaks

* removed unused test and fixed position test

* some fixes but still broken tests

* fixes for producer and consumer

* add producer to list

* updated dependencies

* positions model layer

* updating migration scripts to new knex standards for table creation

* disconnect topicName

* Feature/#355integrations

@vgenev integration tests fixes

* Cleaning up code and renaming integration test file names

* Changes according to rmothilal PR review

* WIP

* premerge with Rajiv db changes

* WIP

* WIP

* WIP

* PositionHandler::positions::commit

* Avoid knex version warning: http://knexjs.org/#Schema-timestamps

* Fixing minor bugs

* fixes for prepare position still needs rework

* .then to await

* fixes. now writes to database and updates accordingly. minor defects to fix

* fixes to allow flow to continue to transfer handler

* removal of space

* Fulfil reject scenario

* Move projection to facade transaction

* Unit tests batch 1

* Transfer facade unit test coverage 100 percent

* temporary fix for sorting transfer state change Id

* Position facade unit test coverage 100 percent

* Inserting placeholders for integration tests

* refactoring the position/facade

* moar refactoring

* fixed array.from map callback

* refactored the integration tests for testPI2/integration/domain/participant/index.test.js (#7)

* position facade refactored and debuged. changed the test prepare route to return different transfers

* small issue on the handler fixed

* fixed some string to numbers parsing issues

* moar refactoring. a small one

* Integration test handlers reworked

* Updated registerHandler functions for positions and prepare to allow for specific registration of FSPs (#8)

* Updated registerHandler functions for positions and prepare to allow for specific registration of FSPs

* Removed comment and fixed jsdoc param name

* merging

* merged and commented out few tests

* handlers integration test additions

* integration tests additions

* Finilizing integration tests work

* added unit tests (#9)

* seeds and domain/participant 100

* Adding more unit tests to improve coverage

* Reduce wait time during unit testing for time.js

* Enable sidecar and auth keychain

* Disable dev seed

* adjusted the position calculations according the latest review

* adjusted positions calculations according the latest review take2

* merged with #308

* fixed handlers tests

* unit tests running ok now

* fixed 573 tests

* integration test fix

* fixes for tests as well as making save transfer prepare a transaction

* update node package.json for cache refresh on circleci
…ment findings and recommendations as of PI3.2 (#104)

* mojaloop/project#371:
- [x] Kafka Performance - Implement Configuration changes [ @mdebarros ]
- [x] Kafka Performance - Implement config switch to enable/disable Auto-Commit and/or Manual-Commits for Central-Ledger [ @mdebarros ]
- [x] Kafka Performance - Implement config switch to enable/disable Auto-Commit and/or Manual-Commits for Central-Ledger

* Fixed unit test for getKafkaConfig to validate the function generically.

* Commented out legacy pre-PI2 even where emitters were used for handled transfers.

* Added commanderjs and updated package version to match sprint release.

* Added CLI to start and stop Handlers as required, and updated Setup methods to cater for them.

* Commented out rejects from the Handler CLI since it has not been implemented.

* Updated the Handler CLI, added associated Tests, etc.

* Added JSdocs to the init function, and cleaned up the CLI for no params being passed.

* Added missing licenses from new files

* Adding support for cache versioning for circle CI

* Fixed config for integration tests.

* Fixed typo in json for integration-config.json

* implemented work around to the {{ .Environments.variable}} not functioning correctly. Refer to https://discuss.circleci.com/t/cannot-use-circle-yml-environment-variables-in-cache-keys/10994/7

* removing the general dependencies from the integration test job in circleci config since it is using the standard circleci container which already contains the required dependencies.

* Added some notes to the JSDocs for the init function

* Fixed unit test description for setup.test.js

* Updated based on PR comments from @rmothilal: #104
@mdebarros mdebarros self-assigned this Aug 3, 2018
@mdebarros mdebarros changed the title 3.3.0-snapshot release 3.3.0-snapshot Aug 3, 2018
@mdebarros mdebarros mentioned this pull request Aug 3, 2018
20 tasks
ggrg and others added 2 commits August 6, 2018 16:37
* Added integration tests for Payer position increase during PREPARE
* Adding rmothilal as contributor for transferPrepareExceedLimitTest
* Reinitiating integration tests
* Reinitiating integration tests - 2
* Reinitiating integration tests - 3
* Added initial helper scripts for local testing

* Added the no_output_timeout for the integration test in circleci config
@mdebarros
Copy link
Member Author

Closing this PR since we are moving develop-PI3 to develop, and deleting this branch as per story: mojaloop/project#392

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants