Skip to content

Commit

Permalink
Settlement-v2 merge into master (#259)
Browse files Browse the repository at this point in the history
* feature/1095 Close Settlement Window Changes (#220)

* Refactor scripts tree structure

* Dependencies upgrade

* Changed server setup and init. Registered Settlement Window Handler. Added CLI handler management. Shortened {id} paths. Window to PROCESSING state. Settlement window producer. Settlement window consumer. Default config added. Updated package.json scripts

* Added broker service health check

* SettlementWindowHandler ErrorHandling and async-retry

* Fix unit tests. Coverage fails at 91.32%

* SettlementWindowHandler Processing

* Fix integration tests

* Switched the latest release of central-services-shared

* Added unit test for API index.js . Code coverage now 89.5 percent

* Removed unnecessary commented lines from test

* Added unit tests for lib/healthcheck

* feature/1096 Create Settlement Changes #1 (#224)

* Changed swagger definition

* Settlement model validation. Unit tests fail

* select distinct

* Settlement window content validation. Fixed unit tests

* Deleted code to fix the two plugin issues and unit test for Handler - index.js

* feature/1097 Create Settlement Changes #2 (#225)

* Implemented inserts (not tested). Changed response definition. Unit tests fail

* Generate response. Validate proper implementation. Disable failing unit tests to be adjusted

* feature/1099 Update Settlement by ID Changes (#229)

* Implement updateSettlementByIdChanges enhancement

* Entire settlement process verified using various scenarios. Corrections made where applicable

* feature/1165 Unit tests for central-settlement part1

* Completed the unit test for register handlers code.

* Domain settlement windows close , added unit test

* Added more unit testing code to the settlement  windows models facade

* Added unit tests and fixed existing ones  to cover unhappy lines in process

* Added unit tests to shared/setup to cope with the service types

* Added unit test for shared setup : handler service type - and run handler true without any modules.

* Added unit test for settlement window with a handler list

* Added unit test to increase code coverage for settlement window facade

* Add unit test testing the settlement window state "not Processing"

* Added unit test to roll back settlement window facade when error occurs

* Added unit test on process to cover rollback on critical error and updated the version on central services shared to "8.8.2",

* Added unit testcode to close window

* Fixed the knex raw and .join isn't a function errors

* Changes:

- Added a unit test file and unit tests for SettlementWindow handler
- Made some fixes on the SettlementWindow handler

* Added last unit test on the facade. the tests are being ran in isolation still.

* Added last knex builder stubs to facade unit tests

* Combined the Stubs for the facade

* Worked on branches to increase covereage

Co-authored-by: lazolalucas <lazolalucas@users.noreply.github.com>

* feature/1100 Settlement By Currency Wrap Up (#231)

* Fixed and extended integration testing for settlement-v2

* Add anchore summary report upload, bump package version to 8.8.0 (#230)

* Full coverage for domain/settlement/index & models/lib/enums

* Full coverage for inculded scripts

* Integration testing config to run properly

* Finilize unit tests and full coverage

Co-authored-by: Lewis Daly <lewisdaly@me.com>

* Feature/1180 enhance get settlement windows by (#238)

* Added code changes to DAO and handler to include settlementwindow content

* Added code changes to DAO and handler to include settlementwindow content

* Added code changes to unit test to increase code coverage

* Changed code to fix the integration error

* Code review changes : added  SettlementWindowContentModel.getBySettlementWindowId function. Unit tests are still failing

* Code review changes : Added unit test and fixed unit tests to increase code coverage.

* Code review II : Removed settlement window id from response object and added settlement id to it.

* Trigger a rebuild. Previous commit failed due to internet failure

* Updated swagger definition with the settlementId as integer on the settlementWindowContent

* Fixed vulnerabilities

* feature/1211 Auto position reset (#240)

* Auto position reset functionality

* Re-run integration tests

* Use newest central-ledger snapshot release for integration tests

* feature/1209 Restrict Create Settlement (#249)

* Forbid GROSS/IMMEDATE models, when creating new settlement

* Corrected typo as per PR request

* Feature/926 enhanced get settlement windows by params (#254)

*  feature/926-EnhancegetSettlementWindowsByParams

 - Enhanced getSettlementWindowsByParams to query with currency param
 - Updated the response object to include content

*  feature/926-EnhancegetSettlementWindowsByParams

 - Enhanced getSettlementWindowsByParams to query with currency param
 - Updated the response object to include content

*  feature/926-EnhancegetSettlementWindowsByParams

 - Enhanced getSettlementWindowsByParams to query with currency param
 - Updated the response object to include content

* Added async-retry

* - Update the facade to be able to query using currency
- removed the caret sign ^ from package.json

* - Trigger rebuild

* Prepare version for PR against master

* Trigger circle CI re-run

* Downgrade @mojaloop/central-services-database due to integration tests failure

* Address PR review request and update dependencies

Co-authored-by: deonbotha <deon.botha@modusbox.com>
Co-authored-by: lazolalucas <lazolalucas@users.noreply.github.com>
Co-authored-by: Lewis Daly <lewis@vesselstech.com>
  • Loading branch information
4 people authored Feb 28, 2020
1 parent de62154 commit e878ee4
Show file tree
Hide file tree
Showing 72 changed files with 7,276 additions and 4,492 deletions.
12 changes: 2 additions & 10 deletions audit-resolve.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
{
"decisions": {
"1300|@mojaloop/central-ledger>hapi-swagger>handlebars": {
"decision": "postpone",
"madeAt": 1573224238328
},
"1300|nyc>istanbul-reports>handlebars": {
"decision": "postpone",
"madeAt": 1573224238328
},
"1482|@hapi/hapi": {
"decision": "ignore",
"madeAt": 1582123771440,
"expiresAt": 1582728550777
"madeAt": 1582888595088,
"expiresAt": 1585480556972
}
},
"rules": {},
Expand Down
57 changes: 57 additions & 0 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,55 @@
"CREATE_RETRY_INTERVAL_MILLIS": 200,
"DEBUG": false
},
"WINDOW_AGGREGATION": {
"RETRY_COUNT": 3,
"RETRY_INTERVAL": 3000
},
"TRANSFER_VALIDITY_SECONDS": "432000",
"HUB_PARTICIPANT": {
"ID": 1,
"NAME": "Hub"
},
"HANDLERS": {
"DISABLED": false,
"API": {
"DISABLED": false
}
},
"KAFKA": {
"TOPIC_TEMPLATES": {
"GENERAL_TOPIC_TEMPLATE": {
"TEMPLATE": "topic-{{functionality}}-{{action}}",
"REGEX": "topic-(.*)-(.*)"
}
},
"CONSUMER": {
"SETTLEMENTWINDOW": {
"CLOSE": {
"config": {
"options": {
"mode": 2,
"batchSize": 1,
"pollFrequency": 10,
"recursiveTimeout": 100,
"messageCharset": "utf8",
"messageAsJSON": true,
"sync": true,
"consumeTimeout": 1000
},
"rdkafkaConf": {
"client.id": "cs-con-setlementwindow-close",
"group.id": "cs-group-setlementwindow-close",
"metadata.broker.list": "localhost:9092",
"socket.keepalive.enable": true
},
"topicConf": {
"auto.offset.reset": "earliest"
}
}
}
}
},
"PRODUCER": {
"NOTIFICATION": {
"EVENT": {
Expand All @@ -56,6 +93,26 @@
}
}
}
},
"SETTLEMENTWINDOW": {
"CLOSE": {
"config": {
"options": {
"messageCharset": "utf8"
},
"rdkafkaConf": {
"metadata.broker.list": "localhost:9092",
"client.id": "cs-prod-setlementwindow-close",
"event_cb": true,
"dr_cb": true,
"socket.keepalive.enable": true,
"queue.buffering.max.messages": 10000000
},
"topicConf": {
"request.required.acks": "all"
}
}
}
}
}
}
Expand Down
Loading

0 comments on commit e878ee4

Please sign in to comment.