mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 13:02:11 +03:00
1f14781d15
dupe of @chrisdone's work https://github.com/hasura/graphql-engine-mono/pull/2829 with a branch rename PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2901 Co-authored-by: Chris Done <11019+chrisdone@users.noreply.github.com> GitOrigin-RevId: 8381e53a18242b75d7e17b18a2ba3b2d99dd1322
116 lines
2.7 KiB
Haskell
116 lines
2.7 KiB
Haskell
{-# LANGUAGE DisambiguateRecordFields #-}
|
|
|
|
-- | Constant configurations used throughout the test suite.
|
|
module Harness.Constants
|
|
( postgresPassword,
|
|
postgresUser,
|
|
postgresDb,
|
|
postgresHost,
|
|
postgresPort,
|
|
postgresqlConnectionString,
|
|
postgresLivenessCheckAttempts,
|
|
postgresLivenessCheckIntervalSeconds,
|
|
postgresLivenessCheckIntervalMicroseconds,
|
|
mysqlLivenessCheckAttempts,
|
|
mysqlLivenessCheckIntervalSeconds,
|
|
mysqlLivenessCheckIntervalMicroseconds,
|
|
mysqlPassword,
|
|
mysqlUser,
|
|
mysqlDatabase,
|
|
mysqlHost,
|
|
mysqlPort,
|
|
mysqlConnectInfo,
|
|
httpHealthCheckAttempts,
|
|
httpHealthCheckIntervalSeconds,
|
|
httpHealthCheckIntervalMicroseconds,
|
|
graphqlEngineUrlPrefix,
|
|
)
|
|
where
|
|
|
|
import Data.Word
|
|
import Database.MySQL.Simple qualified as Mysql
|
|
import Prelude
|
|
|
|
postgresPassword :: String
|
|
postgresPassword = "chinook"
|
|
|
|
postgresUser :: String
|
|
postgresUser = "chinook"
|
|
|
|
postgresDb :: String
|
|
postgresDb = "chinook"
|
|
|
|
postgresHost :: String
|
|
postgresHost = "127.0.0.1"
|
|
|
|
postgresPort :: Word16
|
|
postgresPort = 5432
|
|
|
|
postgresqlConnectionString :: String
|
|
postgresqlConnectionString =
|
|
"postgres://"
|
|
++ postgresUser
|
|
++ ":"
|
|
++ postgresPassword
|
|
++ "@"
|
|
++ postgresHost
|
|
++ ":"
|
|
++ show postgresPort
|
|
++ "/"
|
|
++ postgresDb
|
|
|
|
postgresLivenessCheckAttempts :: Int
|
|
postgresLivenessCheckAttempts = 5
|
|
|
|
postgresLivenessCheckIntervalSeconds :: Int
|
|
postgresLivenessCheckIntervalSeconds = 1
|
|
|
|
postgresLivenessCheckIntervalMicroseconds :: Int
|
|
postgresLivenessCheckIntervalMicroseconds = 1000 * 1000 * postgresLivenessCheckIntervalSeconds
|
|
|
|
mysqlLivenessCheckAttempts :: Int
|
|
mysqlLivenessCheckAttempts = 5
|
|
|
|
mysqlLivenessCheckIntervalSeconds :: Int
|
|
mysqlLivenessCheckIntervalSeconds = 1
|
|
|
|
mysqlLivenessCheckIntervalMicroseconds :: Int
|
|
mysqlLivenessCheckIntervalMicroseconds = 1000 * 1000 * mysqlLivenessCheckIntervalSeconds
|
|
|
|
mysqlPassword :: String
|
|
mysqlPassword = "hasuraMySQL1"
|
|
|
|
mysqlUser :: String
|
|
mysqlUser = "root"
|
|
|
|
mysqlDatabase :: String
|
|
mysqlDatabase = "hasura"
|
|
|
|
mysqlHost :: String
|
|
mysqlHost = "127.0.0.1"
|
|
|
|
mysqlPort :: Word16
|
|
mysqlPort = 3306
|
|
|
|
mysqlConnectInfo :: Mysql.ConnectInfo
|
|
mysqlConnectInfo =
|
|
Mysql.defaultConnectInfo
|
|
{ Mysql.connectUser = mysqlUser,
|
|
Mysql.connectPassword = mysqlPassword,
|
|
Mysql.connectDatabase = mysqlDatabase,
|
|
Mysql.connectHost = mysqlHost,
|
|
Mysql.connectPort = mysqlPort
|
|
}
|
|
|
|
httpHealthCheckAttempts :: Int
|
|
httpHealthCheckAttempts = 5
|
|
|
|
httpHealthCheckIntervalSeconds :: Int
|
|
httpHealthCheckIntervalSeconds = 1
|
|
|
|
httpHealthCheckIntervalMicroseconds :: Int
|
|
httpHealthCheckIntervalMicroseconds = 1000 * 1000 * httpHealthCheckIntervalSeconds
|
|
|
|
graphqlEngineUrlPrefix :: String
|
|
graphqlEngineUrlPrefix = "http://127.0.0.1:8080"
|