daml/triggers
Rohan Jacob-Rao 09254a0fa8
Trigger service: streamline running tests with and without the database (#6205)
This adds a function withTriggerServiceAndDb which runs a test twice, once with and once without a database, and succeeds if both succeed. This will be useful for reusing test logic with both backends and making sure behaviour is consistent. I have used this function where possible, but it won't work for everything until stop is implemented on the DB side.

At the moment this new function squashes two tests into one making it hard to tell whether it failed with or without the database. In a future PR I will investigate using an abstract class to run the tests separately (hopefully with altered descriptions).

This feature required a few changes in the process, mainly:
- Use PostgresAroundAll to connect/disconnect to the database before and after all tests run
- Add a destroy method to the TriggerDao to reset the database between tests
- Use the TriggerDao in the withTriggerService functions to initialize / clean up the database at the start / end of each test
- Sort trigger instances from list using Scala's sort, not relying on Postgres' ordering of UUIDs. This also means we need to use UUIDs for trigger instances in the tests and sort nonempty vectors in expected results.
2020-06-04 09:30:26 -04:00
..
daml Add createAndExerciseCmd to triggers (#5990) 2020-05-14 13:24:01 -04:00
runner DAML-LF: Kill RelativeContractId (#5991) 2020-05-25 22:30:45 +02:00
service Trigger service: streamline running tests with and without the database (#6205) 2020-06-04 09:30:26 -04:00
tests Introduce DAML-LF value caching for transaction service (#6052) 2020-05-26 08:33:53 +00:00