packages feed

genesis-test-0.0.1.0: test-suite/Main.hs

{-# LANGUAGE TemplateHaskell #-}

import qualified Env
import qualified Spec

import Control.Monad.Logger (runNoLoggingT)
import Genesis.Persist.Migrate (runMigrations)
import Genesis.Test

main :: IO ()
main = do
  opts <- Env.parse (Env.header "genesis-test test suite") postgresOptions
  runNoLoggingT $ withGlobalPostgresqlConn opts $ do
    runDBCommit $(runMigrations "test-suite/migrations")
    hspec Spec.spec