2021-11-19 18:13:33 +03:00
|
|
|
-- | Service liveness tests: Confirm that the harness is working
|
2021-11-17 22:50:39 +03:00
|
|
|
-- properly. If this passes, the rest of the tests will pass.
|
2022-01-21 10:48:27 +03:00
|
|
|
module Test.ServiceLivenessSpec (spec) where
|
2021-11-17 22:50:39 +03:00
|
|
|
|
2022-01-21 10:48:27 +03:00
|
|
|
import Harness.Backend.Citus qualified as Citus
|
2022-08-25 20:17:28 +03:00
|
|
|
import Harness.Backend.Cockroach qualified as Cockroach
|
2022-01-21 10:48:27 +03:00
|
|
|
import Harness.Backend.Mysql qualified as Mysql
|
|
|
|
import Harness.Backend.Postgres qualified as Postgres
|
|
|
|
import Harness.Backend.Sqlserver qualified as Sqlserver
|
2021-11-23 21:15:17 +03:00
|
|
|
import Harness.GraphqlEngine qualified as GraphqlEngine
|
2021-11-17 22:50:39 +03:00
|
|
|
import Harness.Http qualified as Http
|
2022-04-20 20:15:42 +03:00
|
|
|
import Harness.TestEnvironment (TestEnvironment (TestEnvironment, server))
|
2022-08-03 17:18:43 +03:00
|
|
|
import Hasura.Prelude
|
2021-11-17 22:50:39 +03:00
|
|
|
import Test.Hspec
|
|
|
|
|
2022-04-20 20:15:42 +03:00
|
|
|
spec :: SpecWith TestEnvironment
|
2021-11-17 22:50:39 +03:00
|
|
|
spec = do
|
2021-11-23 21:15:17 +03:00
|
|
|
ignoreSubject do
|
2022-08-25 20:17:28 +03:00
|
|
|
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 ()
|
2021-11-17 22:50:39 +03:00
|
|
|
it
|
2022-08-25 20:17:28 +03:00
|
|
|
"graphql-engine"
|
2022-04-20 20:15:42 +03:00
|
|
|
\TestEnvironment {server} ->
|
2021-11-23 21:15:17 +03:00
|
|
|
shouldReturn
|
2022-02-14 20:24:24 +03:00
|
|
|
(Http.healthCheck (GraphqlEngine.serverUrl server))
|
2021-11-23 21:15:17 +03:00
|
|
|
()
|