graphql-engine/server/tests-hspec/Test/ServiceLivenessSpec.hs
Gil Mizrahi 5aab7e5ce9 add cockroach to docker compose and tests-hspec
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5558
Co-authored-by: Daniel Harvey <4729125+danieljharvey@users.noreply.github.com>
GitOrigin-RevId: b7f242939e718d5bb4f22b11c093ae77d21cdcce
2022-08-25 17:18:40 +00:00

30 lines
1.1 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.Cockroach qualified as Cockroach
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 "Postgres" $ shouldReturn Postgres.livenessCheck ()
it "MySQL" $ shouldReturn Mysql.livenessCheck ()
it "SQLServer" $ shouldReturn Sqlserver.livenessCheck ()
it "Citus" $ shouldReturn Citus.livenessCheck ()
it "Cockroach" $ shouldReturn Cockroach.livenessCheck ()
it
"graphql-engine"
\TestEnvironment {server} ->
shouldReturn
(Http.healthCheck (GraphqlEngine.serverUrl server))
()