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.
|
2021-11-19 18:13:33 +03:00
|
|
|
module ServiceLivenessSpec (spec) where
|
2021-11-17 22:50:39 +03:00
|
|
|
|
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
|
|
|
|
import Harness.Mysql qualified as Mysql
|
|
|
|
import Harness.Postgres qualified as Postgres
|
2021-11-23 21:15:17 +03:00
|
|
|
import Harness.State (State, getServer)
|
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-11-17 22:50:39 +03:00
|
|
|
it
|
|
|
|
"graphql-engine liveness"
|
2021-11-23 21:15:17 +03:00
|
|
|
\state ->
|
|
|
|
shouldReturn
|
|
|
|
(Http.healthCheck (GraphqlEngine.serverUrl (getServer state)))
|
|
|
|
()
|