mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-18 04:51:35 +03:00
b091c75372
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3421 GitOrigin-RevId: 8802d7e6a360edee62011ef371cc8930f36b25b1
28 lines
1013 B
Haskell
28 lines
1013 B
Haskell
-- | Service liveness tests: Confirm that the harness is working
|
|
-- properly. If this passes, the rest of the tests will pass.
|
|
module Test.ServiceLivenessSpec (spec) where
|
|
|
|
import Harness.Backend.Citus qualified as Citus
|
|
import Harness.Backend.Mysql qualified as Mysql
|
|
import Harness.Backend.Postgres qualified as Postgres
|
|
import Harness.Backend.Sqlserver qualified as Sqlserver
|
|
import Harness.GraphqlEngine qualified as GraphqlEngine
|
|
import Harness.Http qualified as Http
|
|
import Harness.State (State, getServer)
|
|
import Test.Hspec
|
|
import Prelude
|
|
|
|
spec :: SpecWith State
|
|
spec = do
|
|
ignoreSubject do
|
|
it "PostgreSQL liveness" $ shouldReturn Postgres.livenessCheck ()
|
|
it "MySQL liveness" $ shouldReturn Mysql.livenessCheck ()
|
|
it "SQLServer liveness" $ shouldReturn Sqlserver.livenessCheck ()
|
|
it "Citus liveness" $ shouldReturn Citus.livenessCheck ()
|
|
it
|
|
"graphql-engine liveness"
|
|
\state ->
|
|
shouldReturn
|
|
(Http.healthCheck (GraphqlEngine.serverUrl (getServer state)))
|
|
()
|