Radish alpha
r
rad:z4D5UCArafTzTQpDZNQRuqswh3ury
Radicle desktop app
Radicle
Git
Refactor backend to hexagonal architecture
Open did:key:z6MkkfM3...sVz5 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

did:key:z6MkkfM3...sVz5 opened with revision 6f82b5ab on base 08a2b01f +7050 -6397 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

did:key:z6MkkfM3...sVz5 pushed revision 2 22e7de7e on base b770fac3 +7308 -6390 1 year ago

Rebase and make tests pretty stable

rudolfs reviewed ยท 4 comments 1 year ago

Left some inline comments.