graphql-engine/server/lib/test-harness/test-harness.cabal
Samir Talwar 44a64ed983 server/test-harness: Wrap test resource setup/teardown.
When setting up a resource (typically some kind of web server) for use in tests, we need to remember to tear it down afterwards.

This moves this logic into one place, under the `TestResource` module.

Like `SetupAction`, it encapsulates setup and teardown, and also separates out waiting for the resource to be ready, so we don't accidentally leave it lying around in the case of a healthcheck failure.

Unlike `SetupAction`, it is monadic, and can be composed with other resources. In the future, we may want to adopt this logic for `SetupAction` too rather than using lists.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6806
GitOrigin-RevId: 74e2d76c5c09b8e0fe1cad84c9e77011f5a4d3db
2022-11-10 08:38:09 +00:00

124 lines
2.5 KiB
Plaintext

cabal-version: 2.2
name: test-harness
version: 0.1.0.0
library
build-depends:
, Spock-core
, aeson
, aeson-pretty
, async
, base
, bytestring
, conduit
, containers
, dc-api
, ekg-core
, fast-logger
, graphql-engine
, haskell-src-meta
, hasura-prelude
, hspec
, hspec-core
, http-conduit
, http-types
, insert-ordered-containers
, libyaml
, lens
, lens-aeson
, managed
, morpheus-graphql
, mtl
, mysql-simple
, network
, odbc
, openapi3
, parsec
, pg-client
, postgresql-simple
, pretty-simple
, refined
, resourcet
, safe-exceptions
, servant-server
, sop-core
, stm
, string-interpolate
, template-haskell
, text
, th-lift
, th-lift-instances
, time
, typed-process
, unordered-containers
, uuid
, vector
, warp
, websockets
, yaml
hs-source-dirs: src
default-language: Haskell2010
default-extensions:
BangPatterns
BlockArguments
DeriveLift
DerivingStrategies
FlexibleContexts
FlexibleInstances
GADTs
GeneralisedNewtypeDeriving
ImportQualifiedPost
LambdaCase
NamedFieldPuns
NoImplicitPrelude
OverloadedStrings
RankNTypes
RecordWildCards
ScopedTypeVariables
StandaloneDeriving
TupleSections
TypeApplications
TypeSynonymInstances
ghc-options: -Wall -Werror
exposed-modules:
Harness.Backend.BigQuery
Harness.Backend.Citus
Harness.Backend.Cockroach
Harness.Backend.DataConnector.Chinook
Harness.Backend.DataConnector.Chinook.Reference
Harness.Backend.DataConnector.Chinook.Sqlite
Harness.Backend.DataConnector.Mock
Harness.Backend.DataConnector.Mock.Server
Harness.Backend.DataConnector.Sqlite
Harness.Backend.Mysql
Harness.Backend.Postgres
Harness.Backend.Sqlserver
Harness.Constants
Harness.Env
Harness.Exceptions
Harness.GraphqlEngine
Harness.Http
Harness.Logging
Harness.Logging.Messages
Harness.Quoter.Graphql
Harness.Quoter.Yaml
Harness.Quoter.Yaml.InterpolateYaml
Harness.RemoteServer
Harness.Subscriptions
Harness.Test.BackendType
Harness.Test.CustomOptions
Harness.Test.Fixture
Harness.Test.Introspection
Harness.Test.Permissions
Harness.Test.Schema
Harness.Test.SchemaName
Harness.Test.SetupAction
Harness.Test.TestResource
Harness.TestEnvironment
Harness.Webhook
Harness.Yaml