graphql-engine/server/tests-hspec/Test/ServiceLivenessSpec.hs
Philip Lykke Carlsen b658df1c43 Spike attempt at adding logging to the hspec test-suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4772
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 5c6c9056952574462d5b309774331a909a7eac6d
2022-08-03 14:19:53 +00:00

28 lines
1.0 KiB
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.TestEnvironment (TestEnvironment (TestEnvironment, server))
import Hasura.Prelude
import Test.Hspec
spec :: SpecWith TestEnvironment
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"
\TestEnvironment {server} ->
shouldReturn
(Http.healthCheck (GraphqlEngine.serverUrl server))
()