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
|
|
|
|
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-02-14 20:24:24 +03:00
|
|
|
import Harness.State (State (State, server))
|
2021-11-17 22:50:39 +03:00
|
|
|
import Test.Hspec
|
2021-11-23 21:15:17 +03:00
|
|
|
import Prelude
|
2021-11-17 22:50:39 +03:00
|
|
|
|
2021-11-23 21:15:17 +03:00
|
|
|
spec :: SpecWith State
|
2021-11-17 22:50:39 +03:00
|
|
|
spec = do
|
2021-11-23 21:15:17 +03:00
|
|
|
ignoreSubject do
|
|
|
|
it "PostgreSQL liveness" $ shouldReturn Postgres.livenessCheck ()
|
|
|
|
it "MySQL liveness" $ shouldReturn Mysql.livenessCheck ()
|
2021-12-30 14:00:52 +03:00
|
|
|
it "SQLServer liveness" $ shouldReturn Sqlserver.livenessCheck ()
|
|
|
|
it "Citus liveness" $ shouldReturn Citus.livenessCheck ()
|
2021-11-17 22:50:39 +03:00
|
|
|
it
|
|
|
|
"graphql-engine liveness"
|
2022-02-14 20:24:24 +03:00
|
|
|
\State {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
|
|
|
()
|