diff --git a/server/lib/api-tests/src/Test/Queries/Simple/OperationNameSpec.hs b/server/lib/api-tests/src/Test/Queries/Simple/OperationNameSpec.hs index 197a0b0218a..722804a9fc1 100644 --- a/server/lib/api-tests/src/Test/Queries/Simple/OperationNameSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Simple/OperationNameSpec.hs @@ -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