[server/tests] simplify TestEnvironment

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7123
GitOrigin-RevId: 0a7313dab729de08e273ba06e47f656d766ff82a
This commit is contained in:
Daniel Harvey 2022-12-02 11:35:20 +00:00 committed by hasura-bot
parent ffdc9ceca8
commit ef5e983aee
128 changed files with 412 additions and 397 deletions

View File

@ -63,6 +63,11 @@ ghcid-api-tests:
ghcid-test-harness:
$(call run_ghcid,test-harness)
.PHONY: ghcid-api-tests-pro
## ghcid-api-tests-pro: build and watch api-tests in pro
ghcid-api-tests-pro:
$(call run_ghcid,api-tests-pro:exe:api-tests-pro)
.PHONY: ghcid-test-backends
## ghcid-test-backends: run all api tests in ghcid
ghcid-test-backends: start-backends remove-tix-file

View File

@ -95,7 +95,7 @@ Tests are written using [`hspec`](http://hspec.github.io/) and
- Modules are declared under the `Test` namespace.
- Module names must end with `Spec` (e.g. `HelloWorldSpec`).
- Module names must contain some value `spec :: SpecWith TestEnvironment`,
- Module names must contain some value `spec :: SpecWith GlobalTestEnvironment`,
which serves as the entry point for the module.
See the documentation for `hspec` and `hspec-discover`, as well as other
@ -148,7 +148,7 @@ data and the tables onces the test suite finishes. To prevent that,
you can modify your test module to prevent teardown. Example:
```diff
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
[ Fixture.fixture (Fixture.Backend Fixture.SQLServer)

View File

@ -18,7 +18,7 @@ import Harness.Exceptions (HasCallStack, bracket)
import Harness.GraphqlEngine (startServerThread)
import Harness.Logging
import Harness.Test.BackendType (BackendType (..))
import Harness.TestEnvironment (TestEnvironment (..), TestingMode (..), stopServer)
import Harness.TestEnvironment (GlobalTestEnvironment (..), TestEnvironment (..), TestingMode (..), stopServer)
import Hasura.Prelude
import System.Environment (getEnvironment, lookupEnv)
import System.IO.Unsafe (unsafePerformIO)
@ -67,24 +67,20 @@ parseBackendType backendType =
"NONE" -> Just TestNoBackends
_ -> Nothing
setupTestEnvironment :: TestingMode -> Logger -> IO TestEnvironment
setupTestEnvironment :: TestingMode -> Logger -> IO GlobalTestEnvironment
setupTestEnvironment testingMode logger = do
murlPrefix <- lookupEnv "HASURA_TEST_URLPREFIX"
mport <- fmap (>>= readMaybe) (lookupEnv "HASURA_TEST_PORT")
server <- startServerThread ((,) <$> murlPrefix <*> mport)
uniqueTestId <- nextRandom
server <- startServerThread
pure
TestEnvironment
{ server = server,
uniqueTestId = uniqueTestId,
backendType = Nothing,
logger = logger,
testingMode = testingMode
GlobalTestEnvironment
{ logger = logger,
testingMode = testingMode,
server = server
}
teardownTestEnvironment :: TestEnvironment -> IO ()
teardownTestEnvironment TestEnvironment {..} = do
stopServer server
-- | tear down the shared server
teardownTestEnvironment :: GlobalTestEnvironment -> IO ()
teardownTestEnvironment (GlobalTestEnvironment {server}) = stopServer server
-- | allow setting log output type
setupLogType :: IO FL.LogType
@ -99,7 +95,7 @@ setupLogType = do
"STDERR" -> FL.LogStderr 64
_ -> defaultLogType
hook :: HasCallStack => SpecWith TestEnvironment -> Spec
hook :: HasCallStack => SpecWith GlobalTestEnvironment -> Spec
hook specs = do
(testingMode, logType) <-
runIO $

View File

@ -13,11 +13,11 @@ import Harness.GraphqlEngine
import Harness.Quoter.Graphql
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment (..))
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..))
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -13,14 +13,14 @@ import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (SchemaName (..), Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
-- ** Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -15,7 +15,7 @@ import Harness.Yaml qualified as Yaml
import Hasura.Prelude
import Test.Hspec
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -9,7 +9,7 @@ import Harness.Backend.BigQuery qualified as BigQuery
import Harness.GraphqlEngine qualified as GraphqlEngine
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
@ -17,7 +17,7 @@ import Test.Hspec (SpecWith, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -11,7 +11,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Auth.Authorization.DisableRootFields.Common
@ -20,7 +20,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -10,7 +10,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Auth.Authorization.DisableRootFields.Common
@ -19,7 +19,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -17,7 +17,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Auth.Authorization.DisableRootFields.Common
@ -26,7 +26,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
let pgFixture =
(Fixture.fixture $ Fixture.Backend Fixture.Postgres)

View File

@ -11,7 +11,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Auth.Authorization.DisableRootFields.Common
@ -20,7 +20,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -11,7 +11,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Auth.Authorization.DisableRootFields.Common
@ -20,7 +20,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
let pgFixture =
(Fixture.fixture $ Fixture.Backend Fixture.Postgres)

View File

@ -18,7 +18,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -26,7 +26,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -12,13 +12,13 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (BackendType (..), defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.TestEnvironment qualified as TE
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it, pendingWith)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -21,7 +21,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendCapabilities, defaultBackendServerUrl)
import Harness.Test.Fixture (defaultBackendDisplayNameString, defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.TestEnvironment qualified as TE
import Harness.Yaml (shouldReturnYaml, shouldReturnYamlF)
import Hasura.Prelude
@ -30,7 +30,7 @@ import Test.Hspec (SpecWith, describe, it, pendingWith)
--------------------------------------------------------------------------------
-- DataConnector Agent Query Tests
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.runWithLocalTestEnvironmentSingleSetup
( NE.fromList

View File

@ -12,7 +12,7 @@ import Harness.Backend.DataConnector.Mock qualified as Mock
import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Backends.DataConnector.API qualified as API
import Hasura.Prelude
import Language.GraphQL.Draft.Syntax.QQ qualified as G
@ -20,7 +20,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -16,14 +16,14 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Backends.DataConnector.API qualified as API
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -15,7 +15,7 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Backends.DataConnector.API (ColumnName (..), ScalarType (..))
import Hasura.Backends.DataConnector.API qualified as API
import Hasura.Backends.DataConnector.API.V0.Expression
@ -24,7 +24,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -15,14 +15,14 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Backends.DataConnector.API qualified as API
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -20,7 +20,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendCapabilities, defaultBackendServerUrl)
import Harness.Test.Fixture (defaultBackendDisplayNameString, defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.TestEnvironment qualified as TE
import Harness.Yaml (shouldReturnYaml, shouldReturnYamlF)
import Hasura.Backends.DataConnector.API.V0.ConfigSchema (Config (..))
@ -29,7 +29,7 @@ import Test.Hspec (SpecWith, describe, it, pendingWith, shouldBe)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -15,14 +15,14 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Backends.DataConnector.API qualified as API
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -14,14 +14,14 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Backends.DataConnector.API qualified as API
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -13,7 +13,7 @@ import Harness.GraphqlEngine qualified as GraphqlEngine
import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.TestEnvironment qualified as TE
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
@ -22,7 +22,7 @@ import Test.Hspec (SpecWith, describe, it, pendingWith)
--------------------------------------------------------------------------------
-- Reference Agent Query Tests
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -16,14 +16,14 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.BackendType (BackendType (..), defaultBackendTypeString, defaultSource)
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -12,12 +12,12 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment (..))
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..))
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -14,12 +14,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -20,14 +20,14 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (SchemaName (..), Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SchemaName (SchemaName (..))
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
-- ** Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -16,13 +16,13 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Network.HTTP.Types.Header (HeaderName)
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -16,13 +16,13 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..))
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Network.HTTP.Types.Header (HeaderName)
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -16,12 +16,12 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -15,7 +15,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -23,7 +23,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -11,11 +11,11 @@ import Harness.Backend.Postgres qualified as Postgres
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runSingleSetup
( NE.fromList

View File

@ -13,12 +13,12 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -17,12 +17,12 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it, shouldSatisfy)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -15,7 +15,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SetupAction (permitTeardownFail)
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -26,7 +26,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -12,7 +12,7 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
@ -21,7 +21,7 @@ import Test.Hspec
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -13,7 +13,7 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -24,7 +24,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -14,7 +14,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SetupAction (permitTeardownFail)
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -25,7 +25,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -16,7 +16,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SetupAction (permitTeardownFail)
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -27,7 +27,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -12,7 +12,7 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
@ -21,7 +21,7 @@ import Test.Hspec
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -14,7 +14,7 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
@ -23,7 +23,7 @@ import Test.Hspec (SpecWith, it, shouldContain)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironmentSingleSetup
( NE.fromList

View File

@ -16,7 +16,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SetupAction (permitTeardownFail)
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
@ -25,7 +25,7 @@ import Test.Hspec (SpecWith, describe, it, shouldBe)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -18,7 +18,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SetupAction (permitTeardownFail)
import Harness.TestEnvironment (Server (..), TestEnvironment, getServer)
import Harness.TestEnvironment (GlobalTestEnvironment, Server (..), TestEnvironment, getServer)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -30,7 +30,7 @@ import Test.Hspec (SpecWith, it, shouldBe)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironmentSingleSetup
( NE.fromList

View File

@ -13,7 +13,7 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -24,7 +24,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -14,7 +14,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SetupAction (permitTeardownFail)
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Webhook qualified as Webhook
import Harness.Yaml (shouldBeYaml, shouldReturnYaml)
import Hasura.Prelude
@ -25,7 +25,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runWithLocalTestEnvironment
( NE.fromList

View File

@ -26,7 +26,7 @@ data MakeSomeYaml = MakeSomeYaml
-- ** Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = describe "Yaml quasiquoters" $ do
describe "yaml quoter" $ do
it "Interpolates a simple value using a Yaml anchor" $ const do

View File

@ -10,12 +10,12 @@ import Harness.Backend.Postgres qualified as Postgres
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment (..), testLogTrace)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), testLogTrace)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -16,12 +16,12 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
-- TODO: this test causes an internal server error for MySQL, even if we add
-- "SERIAL" as the 'Schema.defaultSerialType' for MySQL.

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -16,12 +16,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -12,7 +12,7 @@ import Harness.PytestPortedCompat (compatSetup)
import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.TestEnvironment (TestEnvironment (..))
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..))
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec
@ -300,7 +300,7 @@ fixture_Citus =
]
}
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = Fixture.runSingleSetup (NE.fromList [fixture_Citus]) tests
tests :: Fixture.Options -> SpecWith TestEnvironment

View File

@ -21,12 +21,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -17,12 +17,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -25,7 +25,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Permissions (Permission (..), selectPermission)
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -33,7 +33,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -22,7 +22,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
@ -30,7 +30,7 @@ import Test.Hspec (SpecWith, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -21,7 +21,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -29,7 +29,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -22,7 +22,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -30,7 +30,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -21,7 +21,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -29,7 +29,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,14 +18,14 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
let execute :: [Schema.Table] -> (Fixture.Options -> SpecWith TestEnvironment) -> SpecWith TestEnvironment
let execute :: [Schema.Table] -> (Fixture.Options -> SpecWith TestEnvironment) -> SpecWith GlobalTestEnvironment
execute tables =
Fixture.run
( NE.fromList

View File

@ -22,12 +22,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -20,12 +20,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -22,7 +22,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -30,7 +30,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -21,12 +21,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -23,12 +23,12 @@ import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -23,12 +23,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -23,7 +23,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -31,7 +31,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -23,7 +23,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
@ -31,7 +31,7 @@ import Test.Hspec (SpecWith, describe, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -21,12 +21,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -21,12 +21,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -6,11 +6,11 @@ import Harness.Backend.Postgres qualified as Postgres
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -12,12 +12,12 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -13,12 +13,12 @@ import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -12,7 +12,7 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Permissions qualified as Permissions
import Harness.Test.Schema hiding (runSQL)
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
@ -20,7 +20,7 @@ import Test.Hspec (SpecWith, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Introspection (introspectEnums, introspectTypes)
import Harness.Test.Permissions (Permission (..), insertPermission, selectPermission)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it, shouldContain)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -17,7 +17,7 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
@ -25,7 +25,7 @@ import Test.Hspec (SpecWith, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -21,7 +21,7 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.TestResource (Managed)
import Harness.TestEnvironment (Server, TestEnvironment, stopServer)
import Harness.TestEnvironment (GlobalTestEnvironment, Server, TestEnvironment, stopServer)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
@ -29,7 +29,7 @@ import Test.Hspec (SpecWith, it)
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = Fixture.runWithLocalTestEnvironment contexts tests
where
contexts = NE.fromList $ do

View File

@ -10,7 +10,7 @@ import Harness.GraphqlEngine qualified as GraphqlEngine
import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec
@ -18,7 +18,7 @@ import Test.Hspec
--------------------------------------------------------------------------------
-- Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
-- Postgres
Fixture.run

View File

@ -15,12 +15,12 @@ import Harness.Quoter.Yaml
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnOneOfYaml, shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -6,11 +6,11 @@ import Harness.Backend.Postgres qualified as Postgres
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -7,11 +7,11 @@ import Harness.Backend.Postgres qualified as Postgres
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment (..))
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..))
import Hasura.Prelude
import Test.Hspec
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( (Fixture.fixture $ Fixture.Backend Fixture.Postgres)

View File

@ -19,14 +19,14 @@ import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (SchemaName (..), Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SchemaName (SchemaName (..))
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
-- ** Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -22,14 +22,14 @@ import Harness.Test.Permissions qualified as Permission
import Harness.Test.Schema (SchemaName (..), Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.Test.SchemaName (SchemaName (..))
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
-- ** Preamble
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -14,12 +14,12 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -22,12 +22,12 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Test.Hspec (SpecWith, describe, it)
import Prelude
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.runSingleSetup
( NE.fromList

View File

@ -20,12 +20,12 @@ import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Test.Hspec (SpecWith, describe, it)
import Prelude
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -17,12 +17,12 @@ import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -20,12 +20,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -19,12 +19,12 @@ import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Quoter.Yaml (interpolateYaml, yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.run
( NE.fromList

View File

@ -18,12 +18,12 @@ import Harness.Quoter.Graphql (graphql)
import Harness.Quoter.Yaml (yaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (TestEnvironment)
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
import Harness.Yaml (shouldReturnYaml)
import Hasura.Prelude
import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith TestEnvironment
spec :: SpecWith GlobalTestEnvironment
spec =
Fixture.runSingleSetup
( NE.fromList

Some files were not shown because too many files have changed in this diff Show More