mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
14 lines
445 B
Haskell
14 lines
445 B
Haskell
|
module SpecHook (hook) where
|
||
|
|
||
|
import Data.Text qualified as Text
|
||
|
import Database.MSSQL.Pool (ConnectionString (..))
|
||
|
import Hasura.Prelude
|
||
|
import System.Environment (getEnv)
|
||
|
import Test.Hspec
|
||
|
|
||
|
hook :: SpecWith ConnectionString -> Spec
|
||
|
hook = beforeWith (\_ -> ConnectionString . Text.pack <$> getEnv connectionStringEnvironmentVariable)
|
||
|
|
||
|
connectionStringEnvironmentVariable :: String
|
||
|
connectionStringEnvironmentVariable = "HASURA_MSSQL_CONN_STR"
|