-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
We should be able to make the server-side bits easier. The basic idea would be to make it possible to write the test as:
(helper/with-db-fixture user-db
(let [server (server/make-untangled-test-server
:parser demo/server-parser
:parser-injections #{:user-database}
:components {:user-database user-db})]
(specification "Server tx executes properly"
(behavior "Adds user to database"
(ps/check-response-to-client server add-user-protocol))))
:migrations "app.sample-migrations"
:seed-fn user-seed)
where tempid remapping (seed results) could be found by scanning the parser injections for databases (and use (:seed-result (get-info DatabaseComponent))
).
There are two major changes that need to be made for this to work right:
- Make it so that
start
on aDatabaseComponent
is idempotent (so we don't try to restart it) - Collect ID remaps from all of the databases injected into the parser so that ID support works properly.
I'd suggest we make a new method and deprecate the old, since there are existing users of the old support.
Metadata
Metadata
Assignees
Labels
No labels