mlabs-haskell / cardano-open-oracle-protocol

COOP - Cardano open oracle protocol
Apache License 2.0
22 stars 3 forks source link

Write service level tests #51

Open bladyjoker opened 2 years ago

bladyjoker commented 2 years ago

COOP relies on a single Publisher gRpc service that relies on 2 backend services FactStatementStore and TxBuilder. All these service require a prelude of setting up and it would be quite reassuring to have tests implemented at the Publisher level.

  1. Prelude FactStatementStore
    • Setup Sqlite db and run the gRpc service
  2. Prelude TxBuilder
    • Setup the Plutip local cluster and initialize the entire COOP system followed by running a TxBulder
  3. Run Publisher

Once the Publisher is active, we can write tests to ensure the entire stack works as intended:

  1. Publishing a Fact Statement
  2. Publishing a Fact Statement that has already been published
  3. Publishing a Fact Statement that doesn't exist in the store
  4. Garbage collection scenarios...