Test all simple queries with websockets

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8228
GitOrigin-RevId: a4aacb08892e489d5209aaf8efce8c7f3adb5b80
This commit is contained in:
Tom Harding 2023-03-07 15:48:54 +00:00 committed by hasura-bot
parent aa39203e13
commit 061c6aa0f9

View File

@ -17,6 +17,7 @@ import Harness.Backend.Sqlserver qualified as Sqlserver
import Harness.GraphqlEngine (postGraphqlYaml)
import Harness.Quoter.Yaml (interpolateYaml)
import Harness.Test.Fixture qualified as Fixture
import Harness.Test.Protocol (withEachProtocol)
import Harness.Test.Schema (Table (..), table)
import Harness.Test.Schema qualified as Schema
import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment)
@ -26,46 +27,47 @@ import Test.Hspec (SpecWith, describe, it)
spec :: SpecWith GlobalTestEnvironment
spec = do
Fixture.run
( NE.fromList
[ (Fixture.fixture $ Fixture.Backend Postgres.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Postgres.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend Citus.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Citus.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend Cockroach.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Cockroach.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend Sqlserver.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Sqlserver.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend BigQuery.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ BigQuery.setupTablesAction schema testEnv
],
Fixture.customOptions =
Just $
Fixture.defaultOptions
{ Fixture.stringifyNumbers = True
}
},
(Fixture.fixture $ Fixture.Backend Sqlite.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnvironment, _) ->
[ Sqlite.setupTablesAction schema testEnvironment
]
}
]
)
tests
withEachProtocol $
Fixture.run
( NE.fromList
[ (Fixture.fixture $ Fixture.Backend Postgres.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Postgres.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend Citus.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Citus.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend Cockroach.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Cockroach.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend Sqlserver.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ Sqlserver.setupTablesAction schema testEnv
]
},
(Fixture.fixture $ Fixture.Backend BigQuery.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnv, _) ->
[ BigQuery.setupTablesAction schema testEnv
],
Fixture.customOptions =
Just $
Fixture.defaultOptions
{ Fixture.stringifyNumbers = True
}
},
(Fixture.fixture $ Fixture.Backend Sqlite.backendTypeMetadata)
{ Fixture.setupTeardown = \(testEnvironment, _) ->
[ Sqlite.setupTablesAction schema testEnvironment
]
}
]
)
tests
--------------------------------------------------------------------------------
-- Schema