Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Refactor backend to hexagonal architecture
sebastinez wants to merge 2 commits into main · opened 1 year ago

Hexagonal Architecture

  • Add new domains around repo, inbox and identity
  • Each domain has:
    • One Service struct that is the public facing API for that domain.
    • One or multiple traits that we are able to implement in the mentioned Service struct.
    • A models module where we store structs, traits and implementations aroun that domain.
  • The Service structs use the outbound modules to use different types of implementations like Sqlite or Radicle to talk to the outside.

New e2e tests

There are no fixtures anymore (for now). Each tests is started with a blank page where:

  • test-http-api process is started
  • fresh ssh-agent process is started
  • New Radicle identity is created.
  • New repo created

And finally the changes applied that we want to test for.

In some cases we start a node for cloning a repo and then stop it too. 8 tests (where there are multiple sub tests take around 23.0 s for me so far.)

Written tests so far:

  • issues (creation, lifecycle, threads, reactions)
  • patches (creation, lifecycle, threads, reactions, revisions)
  • theme
  • onboarding (identity creation, validation)
  • clipboard

CI

checkcheck-unit-testcheck-e2e

👉 Workflow runs 👉 Branch on GitHub