graphql-engine/server/tests-hspec/ServiceLivenessSpec.hs
Chris Done 15071a3bc9 Add SQL Server & Citus to hspec test suite harness and a BasicFields test for each
Relates to https://github.com/hasura/graphql-engine/issues/7755

This includes:

1. SQL Server
2. Citus

And removes the persistent-based testing in favor of duplicating the schema setup, data insertion and teardown.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3030
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: ab03e68436d2ae07a9ddeb5a499ff41e48d0e2d6
2021-12-30 11:01:43 +00:00

28 lines
976 B
Haskell

-- | Service liveness tests: Confirm that the harness is working
-- properly. If this passes, the rest of the tests will pass.
module ServiceLivenessSpec (spec) where
import Harness.Citus qualified as Citus
import Harness.GraphqlEngine qualified as GraphqlEngine
import Harness.Http qualified as Http
import Harness.Mysql qualified as Mysql
import Harness.Postgres qualified as Postgres
import Harness.Sqlserver qualified as Sqlserver
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)))
()