mlabs-haskell / cardanow

Apache License 2.0
2 stars 0 forks source link

Refactor cardano-db-sync code and add tests #80

Closed albertodvp closed 1 month ago

albertodvp commented 1 month ago

Closes #67

~Note: this PR breaks cardanow-ts nix package: in particular the checkPhase is no longer passing: it seems the the mocking is not working as expected~

albertodvp commented 1 month ago

Thanks @aciceri

how the derivation build is not failing if tests are failing? I don't see where you disabled them and if I run nix build locally I see that some tests are executed

the first draft had that, but I managed to fix that so we are currently testing things in CI, good catch! :rocket:

probably not the end of the world since we are talking about tests anyway but is the as unknown as Mock thing unavoidable? Or perhaps it's something commonly done in Typescript? (forgive my ignorance)

Not sure honestly, I'm not a TS expect neither, I'll drop a todo commit so we can look into this better later

The idea is that we start docker during the tests because we need a database? I can't understand how it's mocked otherwise. Perhaps this is why the derivation check phase fails? (running docker in a derivation sandbox may be non trivial)

No we are not, we are only mocking the TS code, docker is not involved