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

chore: add tests #972

Merged
merged 7 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ If you want to run integration tests in a repetitive manner, you can startup the

If you want to run override position topic tests you can repeat the above and use `npm run test:int-override` after configuring settings found [here](#kafka-position-event-type-action-topic-map)

For running integration tests for batch processing interactively
#### For running integration tests for batch processing interactively
- Run dependecies
```
docker-compose up -d mysql kafka init-kafka kafka-debug-console
Expand Down
48 changes: 25 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/domain/position/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const processPositionPrepareBin = async (
)
// Check if payer has insufficient liquidity, produce an error message and abort transfer
} else if (availablePositionBasedOnLiquidityCover.toNumber() < transfer.amount.amount) {
transferStateId = Enum.Transfers.TransferState.ABORTED
transferStateId = Enum.Transfers.TransferInternalState.ABORTED_REJECTED
reason = ErrorHandler.Enums.FSPIOPErrorCodes.PAYER_FSP_INSUFFICIENT_LIQUIDITY.message

const headers = Utility.Http.SwitchDefaultHeaders(
Expand Down Expand Up @@ -130,7 +130,7 @@ const processPositionPrepareBin = async (
)
// Check if payer has surpassed their limit, produce an error message and abort transfer
} else if (availablePositionBasedOnPayerLimit.toNumber() < transfer.amount.amount) {
transferStateId = Enum.Transfers.TransferState.ABORTED
transferStateId = Enum.Transfers.TransferInternalState.ABORTED_REJECTED
reason = ErrorHandler.Enums.FSPIOPErrorCodes.PAYER_LIMIT_ERROR.message

const headers = Utility.Http.SwitchDefaultHeaders(
Expand Down
Loading