packages feed

pgmq-config-0.1.3.0: test/Main.hs

{-# LANGUAGE OverloadedStrings #-}

module Main (main) where

import ConfigSpec qualified
import EphemeralDb (withPgmqDb)
import Test.Tasty (defaultMain, testGroup)

main :: IO ()
main = do
  result <- withPgmqDb $ \pool -> do
    let tree =
          testGroup
            "pgmq-config"
            [ ConfigSpec.tests pool
            ]
    defaultMain tree
  case result of
    Left err -> error $ "Failed to start temp database: " <> show err
    Right () -> pure ()