You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 a DatabaseComponent 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.
The text was updated successfully, but these errors were encountered:
Oh wait: one more unsolved problem. The seed function in this case does not have proper integration with the protocol data. So, at attempt to access a pre-existing thing on the server is kind of tough. Perhaps this isn't easy to simplify further.
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:
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:
start
on aDatabaseComponent
is idempotent (so we don't try to restart it)I'd suggest we make a new method and deprecate the old, since there are existing users of the old support.
The text was updated successfully, but these errors were encountered: