I am currently working on an app that exposes datomic data through a rest api and I am interesting in what are the possible strategies for unit/integration testing.
As I understand these are my problems:
- The in-memory store using (d/connect “datomic:mem://”) is not available anymore, at least in the cloud client
- It is possible to start a local transactor that effectively uses an in-memory store, but how would I control its execution from within my tests ? I investigated the clojure.shell api but it seems limitated as it doesn’t seem I can send signals to spawned processes.
- creating a ‘mock’ datomic component in my tests using with-redefs and with-redefs-fn would couple my tests to my schema, which is subject to changes.
I am interested in knowing if my assumptions above are correct and if yes, what are the strategies this community has adopted to solve that problem.