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

ChequeHandler, Scheduler and cmAccounts refactoring #60

Merged
merged 34 commits into from
Oct 18, 2024

Conversation

evlekht
Copy link
Member

@evlekht evlekht commented Oct 11, 2024

  1. Introduce proper DI as required step for unit tests
    • Move some funcs to ChequeHandler or Processor.
    • Remove IdentificationHandler.
    • Abstract all cm-accounts interaction with CMAccounts service.
    • Abstract all cheque interaction with ChequeHandler.
    • Separate database for ChequeHandler and Scheduler
    • Make scheduler use mocked clock.
  2. Reusable code for ASB:
    • Move some funcs to ChequeHandler
    • Move ChequeHandler from internal/messaging/ to pkg/chequehandler/. (no spaces is unfortunately required because of weird mockgen behavior.
    • Move Scheduler from internal/scheduler/ to pkg/scheduler/.
    • Remove timer from Scheduler, rework it to work with built-in timers and tickers.
    • Extract common sqlite database code to its own package.
  3. Add mocks instead of noop implementations as preparation for unit tests.
  4. Add unit-tests for scheduler.

@evlekht evlekht changed the title wip ChequeHandler, Scheduler and cmAccounts refactoring Oct 17, 2024
@evlekht evlekht marked this pull request as ready for review October 17, 2024 19:33
@evlekht evlekht requested a review from Noctunus October 18, 2024 09:43
@evlekht evlekht merged commit bae3ff2 into dev Oct 18, 2024
3 checks passed
@evlekht evlekht deleted the evlekht/pkg-refactor branch October 18, 2024 09:44
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.

2 participants