mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 09:22:43 +03:00
Add cockroach to default and on_conflict tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6412 GitOrigin-RevId: 637abad70096a06c39a13b9c8683444e2bebdecf
This commit is contained in:
parent
bf87246126
commit
666f34d564
@ -47,6 +47,7 @@ executable api-tests
|
|||||||
TypeFamilies
|
TypeFamilies
|
||||||
|
|
||||||
hs-source-dirs: test
|
hs-source-dirs: test
|
||||||
|
default-language: Haskell2010
|
||||||
|
|
||||||
-- Turning off optimizations is intentional; tests aren't
|
-- Turning off optimizations is intentional; tests aren't
|
||||||
-- performance sensitive and waiting for compilation is a problem.
|
-- performance sensitive and waiting for compilation is a problem.
|
||||||
|
@ -9,6 +9,7 @@ module Test.Postgres.DefaultValuesSpec (spec) where
|
|||||||
import Data.Aeson (Value)
|
import Data.Aeson (Value)
|
||||||
import Data.List.NonEmpty qualified as NE
|
import Data.List.NonEmpty qualified as NE
|
||||||
import Harness.Backend.Citus qualified as Citus
|
import Harness.Backend.Citus qualified as Citus
|
||||||
|
import Harness.Backend.Cockroach qualified as Cockroach
|
||||||
import Harness.Backend.Postgres qualified as Postgres
|
import Harness.Backend.Postgres qualified as Postgres
|
||||||
import Harness.GraphqlEngine (postGraphql)
|
import Harness.GraphqlEngine (postGraphql)
|
||||||
import Harness.Quoter.Graphql (graphql)
|
import Harness.Quoter.Graphql (graphql)
|
||||||
@ -33,6 +34,11 @@ spec =
|
|||||||
{ Fixture.setupTeardown = \(testEnv, _) ->
|
{ Fixture.setupTeardown = \(testEnv, _) ->
|
||||||
[ Citus.setupTablesAction schema testEnv
|
[ Citus.setupTablesAction schema testEnv
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
(Fixture.fixture $ Fixture.Backend Fixture.Cockroach)
|
||||||
|
{ Fixture.setupTeardown = \(testEnv, _) ->
|
||||||
|
[ Cockroach.setupTablesAction schema testEnv
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,7 @@ import Data.Aeson (Value)
|
|||||||
import Data.List.NonEmpty qualified as NE
|
import Data.List.NonEmpty qualified as NE
|
||||||
import Data.Text.Encoding (encodeUtf8)
|
import Data.Text.Encoding (encodeUtf8)
|
||||||
import Harness.Backend.Citus qualified as Citus
|
import Harness.Backend.Citus qualified as Citus
|
||||||
|
import Harness.Backend.Cockroach qualified as Cockroach
|
||||||
import Harness.Backend.Postgres qualified as Postgres
|
import Harness.Backend.Postgres qualified as Postgres
|
||||||
import Harness.GraphqlEngine (postGraphqlWithHeaders)
|
import Harness.GraphqlEngine (postGraphqlWithHeaders)
|
||||||
import Harness.Quoter.Graphql (graphql)
|
import Harness.Quoter.Graphql (graphql)
|
||||||
@ -37,6 +38,12 @@ spec = do
|
|||||||
[ Citus.setupTablesAction schema testEnvironment,
|
[ Citus.setupTablesAction schema testEnvironment,
|
||||||
Citus.setupPermissionsAction (permissions "citus") testEnvironment
|
Citus.setupPermissionsAction (permissions "citus") testEnvironment
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
(Fixture.fixture $ Fixture.Backend BackendType.Cockroach)
|
||||||
|
{ Fixture.setupTeardown = \(testEnvironment, _) ->
|
||||||
|
[ Cockroach.setupTablesAction schema testEnvironment,
|
||||||
|
Cockroach.setupPermissionsAction (permissions "cockroach") testEnvironment
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
module Harness.Spec where
|
|
||||||
|
|
||||||
import Harness.GraphqlEngine (Server)
|
|
||||||
import Test.Hspec
|
|
||||||
|
|
||||||
type Subject = Server
|
|
@ -262,7 +262,9 @@ defaultSerialType =
|
|||||||
{ bstMysql = Nothing,
|
{ bstMysql = Nothing,
|
||||||
bstMssql = Just "INT IDENTITY(1,1)",
|
bstMssql = Just "INT IDENTITY(1,1)",
|
||||||
bstCitus = Just "SERIAL",
|
bstCitus = Just "SERIAL",
|
||||||
bstCockroach = Just "SERIAL",
|
-- cockroachdb's serial behaves differently than postgresql's serial:
|
||||||
|
-- https://www.cockroachlabs.com/docs/v22.1/serial
|
||||||
|
bstCockroach = Just "INT4 GENERATED BY DEFAULT AS IDENTITY",
|
||||||
bstPostgres = Just "SERIAL",
|
bstPostgres = Just "SERIAL",
|
||||||
bstBigQuery = Nothing
|
bstBigQuery = Nothing
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user