2022-11-18 04:33:00 +03:00
|
|
|
{-# LANGUAGE ImportQualifiedPost #-}
|
|
|
|
{-# OPTIONS_GHC -Wno-missing-export-lists #-}
|
|
|
|
|
|
|
|
module Main where
|
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
2023-04-04 12:00:19 +03:00
|
|
|
import Control.Monad
|
2022-11-18 04:33:00 +03:00
|
|
|
import Spec qualified as Test
|
2023-04-04 12:00:19 +03:00
|
|
|
import SpecHook qualified as Test
|
|
|
|
import System.Exit
|
|
|
|
import Test.Hspec.Core.Runner qualified as Hspec
|
2022-11-18 04:33:00 +03:00
|
|
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- | Entrypoint for api-tests test-suite.
|
|
|
|
main :: IO ()
|
2023-04-04 12:00:19 +03:00
|
|
|
main = do
|
|
|
|
testingMode <- Test.setupTestingMode
|
|
|
|
(logger, cleanupLogger) <- Test.setupLogger
|
|
|
|
Test.setupGlobalConfig testingMode (logger, cleanupLogger)
|
|
|
|
|
|
|
|
res <- Hspec.hspecWithResult Hspec.defaultConfig Test.spec
|
|
|
|
cleanupLogger
|
|
|
|
|
|
|
|
unless (Hspec.summaryFailures res == 0) $ exitFailure
|