diff --git a/server/lib/api-tests/src/Test/API/ConcurrentBulkSpec.hs b/server/lib/api-tests/src/Test/API/ConcurrentBulkSpec.hs index 792c33fcffc..957517080b5 100644 --- a/server/lib/api-tests/src/Test/API/ConcurrentBulkSpec.hs +++ b/server/lib/api-tests/src/Test/API/ConcurrentBulkSpec.hs @@ -11,9 +11,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/API/ExplainSpec.hs b/server/lib/api-tests/src/Test/API/ExplainSpec.hs index 42f90b9e552..230d78167d9 100644 --- a/server/lib/api-tests/src/Test/API/ExplainSpec.hs +++ b/server/lib/api-tests/src/Test/API/ExplainSpec.hs @@ -11,8 +11,8 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine import Harness.Quoter.Graphql +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Hasura.Prelude import Test.Hspec (SpecWith, describe, it) diff --git a/server/lib/api-tests/src/Test/API/GraphQL/ContentLengthSpec.hs b/server/lib/api-tests/src/Test/API/GraphQL/ContentLengthSpec.hs index 7750ce919cf..08d29af5f91 100644 --- a/server/lib/api-tests/src/Test/API/GraphQL/ContentLengthSpec.hs +++ b/server/lib/api-tests/src/Test/API/GraphQL/ContentLengthSpec.hs @@ -14,9 +14,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.Http qualified as Http import Harness.Quoter.Graphql (graphql) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getServer, serverUrl) import Hasura.Prelude import Network.HTTP.Simple qualified as Http diff --git a/server/lib/api-tests/src/Test/API/Metadata/ComputedFieldsSpec.hs b/server/lib/api-tests/src/Test/API/Metadata/ComputedFieldsSpec.hs index 0c2ee50fb95..7b355eb5eb0 100644 --- a/server/lib/api-tests/src/Test/API/Metadata/ComputedFieldsSpec.hs +++ b/server/lib/api-tests/src/Test/API/Metadata/ComputedFieldsSpec.hs @@ -10,9 +10,9 @@ import Data.Text qualified as T import Harness.Backend.BigQuery qualified as BigQuery import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (SchemaName (..), Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (SchemaName (..), Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction qualified as SetupAction import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/API/Metadata/InconsistentSpec.hs b/server/lib/api-tests/src/Test/API/Metadata/InconsistentSpec.hs index c2fc82c688a..2910dda837b 100644 --- a/server/lib/api-tests/src/Test/API/Metadata/InconsistentSpec.hs +++ b/server/lib/api-tests/src/Test/API/Metadata/InconsistentSpec.hs @@ -8,9 +8,9 @@ import Data.Maybe qualified as Maybe import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postMetadata, postMetadata_) import Harness.Quoter.Yaml +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment import Harness.Yaml qualified as Yaml import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/API/Metadata/LogicalModels/ValidationSpec.hs b/server/lib/api-tests/src/Test/API/Metadata/LogicalModels/ValidationSpec.hs index f15fd428fb9..d4df1988433 100644 --- a/server/lib/api-tests/src/Test/API/Metadata/LogicalModels/ValidationSpec.hs +++ b/server/lib/api-tests/src/Test/API/Metadata/LogicalModels/ValidationSpec.hs @@ -6,9 +6,9 @@ import Harness.Backend.Cockroach qualified as Cockroach import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (shouldAtLeastBe, shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/API/Metadata/LogicalModelsSpec.hs b/server/lib/api-tests/src/Test/API/Metadata/LogicalModelsSpec.hs index b9d8f8a907a..22897805359 100644 --- a/server/lib/api-tests/src/Test/API/Metadata/LogicalModelsSpec.hs +++ b/server/lib/api-tests/src/Test/API/Metadata/LogicalModelsSpec.hs @@ -16,12 +16,12 @@ import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (yaml) import Harness.Quoter.Yaml.InterpolateYaml +import Harness.Schema qualified as Schema import Harness.Services.GraphqlEngine import Harness.Services.Metadata import Harness.Services.PostgresSource import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig, scalarTypeToText) import Harness.Yaml (shouldBeYaml, shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/API/Metadata/SuggestRelationshipsSpec.hs b/server/lib/api-tests/src/Test/API/Metadata/SuggestRelationshipsSpec.hs index 48be8dbb56a..003760f4fbf 100644 --- a/server/lib/api-tests/src/Test/API/Metadata/SuggestRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/API/Metadata/SuggestRelationshipsSpec.hs @@ -8,8 +8,8 @@ import Data.Maybe qualified as Maybe import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (mapObject, shouldReturnYamlF, sortArray) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/API/Metadata/WarningsSpec.hs b/server/lib/api-tests/src/Test/API/Metadata/WarningsSpec.hs index 3ccbbc4e9cd..2fde51aa3ef 100644 --- a/server/lib/api-tests/src/Test/API/Metadata/WarningsSpec.hs +++ b/server/lib/api-tests/src/Test/API/Metadata/WarningsSpec.hs @@ -8,9 +8,9 @@ import Data.Maybe qualified as Maybe import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postMetadata, postMetadataWithStatus, postMetadata_) import Harness.Quoter.Yaml +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment import Hasura.Prelude import Test.Hspec diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/Common.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/Common.hs index a81c6a1271b..551e3f758a3 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/Common.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/Common.hs @@ -19,7 +19,7 @@ where import Data.Aeson (Value) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) -import Harness.Test.Schema qualified as Schema +import Harness.Schema qualified as Schema import Harness.TestEnvironment (TestEnvironment) listQuery :: TestEnvironment -> Value diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/DefaultRootFieldsSpec.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/DefaultRootFieldsSpec.hs index 8fbada0ff75..3d4217defc8 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/DefaultRootFieldsSpec.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/DefaultRootFieldsSpec.hs @@ -13,9 +13,9 @@ import Harness.Backend.Sqlserver qualified as SQLServer import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Permissions (Permission (..), SelectPermissionDetails (..), selectPermission) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (setupPermissionsAction) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/DisableAllRootFieldsSpec.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/DisableAllRootFieldsSpec.hs index 75deb3a0ceb..3d756c0c27f 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/DisableAllRootFieldsSpec.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/DisableAllRootFieldsSpec.hs @@ -7,9 +7,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAggSpec.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAggSpec.hs index cce62f4d58e..8d3291762a8 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAggSpec.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAggSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as SQLServer import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAllRootFieldsSpec.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAllRootFieldsSpec.hs index fe253d518b2..5772c8cf3a3 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAllRootFieldsSpec.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnableAllRootFieldsSpec.hs @@ -8,9 +8,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as SQLServer import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnablePKSpec.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnablePKSpec.hs index a4adeb715bf..c5a34bb1d22 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnablePKSpec.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/EnablePKSpec.hs @@ -8,9 +8,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as SQLServer import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/RelationshipSpec.hs b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/RelationshipSpec.hs index f975ebe372c..b25e1cc7211 100644 --- a/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/RelationshipSpec.hs +++ b/server/lib/api-tests/src/Test/Auth/Authorization/DisableRootFields/SelectPermission/RelationshipSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Sqlserver qualified as SQLServer import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/DataConnector/MockAgent/RemoteRelationshipsSpec.hs b/server/lib/api-tests/src/Test/DataConnector/MockAgent/RemoteRelationshipsSpec.hs index aae851f8145..2b8c93b8184 100644 --- a/server/lib/api-tests/src/Test/DataConnector/MockAgent/RemoteRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/DataConnector/MockAgent/RemoteRelationshipsSpec.hs @@ -16,10 +16,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..)) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..)) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldBeYaml, shouldReturnYaml) import Hasura.Backends.DataConnector.API qualified as API diff --git a/server/lib/api-tests/src/Test/Databases/BigQuery/LogicalModelsSpec.hs b/server/lib/api-tests/src/Test/Databases/BigQuery/LogicalModelsSpec.hs index 935f164bddc..c1d04ae57db 100644 --- a/server/lib/api-tests/src/Test/Databases/BigQuery/LogicalModelsSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/BigQuery/LogicalModelsSpec.hs @@ -12,11 +12,11 @@ import Harness.Backend.BigQuery qualified as BigQuery import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema +import Harness.Schema.Name (unSchemaName) import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema -import Harness.Test.SchemaName (unSchemaName) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (shouldBeYaml, shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/SpatialTypesSpec.hs b/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/SpatialTypesSpec.hs index c0d57eceb44..800e1058770 100644 --- a/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/SpatialTypesSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/SpatialTypesSpec.hs @@ -10,8 +10,8 @@ import Harness.Backend.BigQuery qualified as BigQuery import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/TypeInterpretationSpec.hs b/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/TypeInterpretationSpec.hs index 175c1d8a02d..da18df2ec17 100644 --- a/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/TypeInterpretationSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/BigQuery/Queries/TypeInterpretationSpec.hs @@ -11,9 +11,9 @@ import Harness.Backend.BigQuery qualified as BigQuery import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/BigQuery/Schema/ComputedFields/TableSpec.hs b/server/lib/api-tests/src/Test/Databases/BigQuery/Schema/ComputedFields/TableSpec.hs index 4c81d9a8bdd..fa88d3257d2 100644 --- a/server/lib/api-tests/src/Test/Databases/BigQuery/Schema/ComputedFields/TableSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/BigQuery/Schema/ComputedFields/TableSpec.hs @@ -13,10 +13,10 @@ import Harness.Backend.BigQuery qualified as BigQuery import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (SchemaName (..), Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (SchemaName (..), Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/Postgres/BackendOnlyPermissionsSpec.hs b/server/lib/api-tests/src/Test/Databases/Postgres/BackendOnlyPermissionsSpec.hs index 5baf1be8b93..aa3cdd168e1 100644 --- a/server/lib/api-tests/src/Test/Databases/Postgres/BackendOnlyPermissionsSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/Postgres/BackendOnlyPermissionsSpec.hs @@ -13,9 +13,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/Postgres/DataValidation/PermissionSpec.hs b/server/lib/api-tests/src/Test/Databases/Postgres/DataValidation/PermissionSpec.hs index 283b32f52d7..5776bbd1aa2 100644 --- a/server/lib/api-tests/src/Test/Databases/Postgres/DataValidation/PermissionSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/Postgres/DataValidation/PermissionSpec.hs @@ -13,9 +13,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..)) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..)) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/Postgres/JsonbSpec.hs b/server/lib/api-tests/src/Test/Databases/Postgres/JsonbSpec.hs index f7be7eb6802..14b4f4d4ae8 100644 --- a/server/lib/api-tests/src/Test/Databases/Postgres/JsonbSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/Postgres/JsonbSpec.hs @@ -14,8 +14,8 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/Postgres/LogicalModelsSpec.hs b/server/lib/api-tests/src/Test/Databases/Postgres/LogicalModelsSpec.hs index 0690bfd2873..a1c1c03823a 100644 --- a/server/lib/api-tests/src/Test/Databases/Postgres/LogicalModelsSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/Postgres/LogicalModelsSpec.hs @@ -14,10 +14,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/Postgres/TimestampSpec.hs b/server/lib/api-tests/src/Test/Databases/Postgres/TimestampSpec.hs index 6669b3103e7..ea589385394 100644 --- a/server/lib/api-tests/src/Test/Databases/Postgres/TimestampSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/Postgres/TimestampSpec.hs @@ -12,9 +12,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/Postgres/UniqueConstraintsSpec.hs b/server/lib/api-tests/src/Test/Databases/Postgres/UniqueConstraintsSpec.hs index c01d888dab2..e88bb2625b2 100644 --- a/server/lib/api-tests/src/Test/Databases/Postgres/UniqueConstraintsSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/Postgres/UniqueConstraintsSpec.hs @@ -8,9 +8,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Citus qualified as Citus import Harness.Backend.Cockroach qualified as Cockroach import Harness.Backend.Postgres qualified as Postgres +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment) import Hasura.Prelude import Test.Hspec (SpecWith, describe, it) diff --git a/server/lib/api-tests/src/Test/Databases/SQLServer/DefaultValues/OnConflictSpec.hs b/server/lib/api-tests/src/Test/Databases/SQLServer/DefaultValues/OnConflictSpec.hs index 62c61bd9ba7..6e6395ad81f 100644 --- a/server/lib/api-tests/src/Test/Databases/SQLServer/DefaultValues/OnConflictSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/SQLServer/DefaultValues/OnConflictSpec.hs @@ -17,8 +17,8 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/SQLServer/InsertVarcharColumnSpec.hs b/server/lib/api-tests/src/Test/Databases/SQLServer/InsertVarcharColumnSpec.hs index 52a7c3f1979..6b903ae7403 100644 --- a/server/lib/api-tests/src/Test/Databases/SQLServer/InsertVarcharColumnSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/SQLServer/InsertVarcharColumnSpec.hs @@ -10,9 +10,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/SQLServer/LogicalModelsSpec.hs b/server/lib/api-tests/src/Test/Databases/SQLServer/LogicalModelsSpec.hs index ed85e360890..2ee0b96d494 100644 --- a/server/lib/api-tests/src/Test/Databases/SQLServer/LogicalModelsSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/SQLServer/LogicalModelsSpec.hs @@ -11,10 +11,10 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment, getBackendTypeConfig, options) import Harness.Yaml (shouldAtLeastBe, shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Databases/SQLServer/VarcharLiteralsSpec.hs b/server/lib/api-tests/src/Test/Databases/SQLServer/VarcharLiteralsSpec.hs index c9ee89430db..63f32322056 100644 --- a/server/lib/api-tests/src/Test/Databases/SQLServer/VarcharLiteralsSpec.hs +++ b/server/lib/api-tests/src/Test/Databases/SQLServer/VarcharLiteralsSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postExplain, postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/EventTriggers/EventTriggersSpecialCharactersSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/EventTriggersSpecialCharactersSpec.hs index 1f815fff159..ed7acc6d0cc 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/EventTriggersSpecialCharactersSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/EventTriggersSpecialCharactersSpec.hs @@ -10,9 +10,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (permitTeardownFail) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerDropSourceCleanupSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerDropSourceCleanupSpec.hs index 7a8775ec524..764f725643a 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerDropSourceCleanupSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerDropSourceCleanupSpec.hs @@ -11,9 +11,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerNextRetryAtTimezoneSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerNextRetryAtTimezoneSpec.hs index 4627634cf03..63cd86d60b6 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerNextRetryAtTimezoneSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggerNextRetryAtTimezoneSpec.hs @@ -10,9 +10,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersForReplicationSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersForReplicationSpec.hs index 889d52a154d..7935fa86064 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersForReplicationSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersForReplicationSpec.hs @@ -8,9 +8,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersNameQuotingSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersNameQuotingSpec.hs index ca01a2a9e96..a649bef8680 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersNameQuotingSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersNameQuotingSpec.hs @@ -9,9 +9,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUniqueNameSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUniqueNameSpec.hs index 56338d96656..b38614f7f84 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUniqueNameSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUniqueNameSpec.hs @@ -10,9 +10,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook import Harness.Yaml (shouldBeYaml, shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUntrackTableCleanupSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUntrackTableCleanupSpec.hs index cbde5a8cfc1..a166d95ae2f 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUntrackTableCleanupSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/MSSQL/EventTriggersUntrackTableCleanupSpec.hs @@ -10,9 +10,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersClearMetadataSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersClearMetadataSpec.hs index 1ca02b7fd30..d876fadf778 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersClearMetadataSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersClearMetadataSpec.hs @@ -8,9 +8,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (SetupAction (..), permitTeardownFail) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersExtensionSchemaSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersExtensionSchemaSpec.hs index 2ee8bbea961..99772a2a457 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersExtensionSchemaSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersExtensionSchemaSpec.hs @@ -11,10 +11,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Exceptions (HasCallStack) import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType 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 (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersForReplicationSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersForReplicationSpec.hs index 8aa61d96091..775abb7d11d 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersForReplicationSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersForReplicationSpec.hs @@ -8,9 +8,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRecreationSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRecreationSpec.hs index 0b0504e22f4..e08f96cdb4f 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRecreationSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRecreationSpec.hs @@ -11,9 +11,9 @@ import Harness.GraphqlEngine (postV2Query_) import Harness.GraphqlEngine qualified as GraphQLEngine import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersReplaceMetadataCleanupSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersReplaceMetadataCleanupSpec.hs index 8b1448e6007..09ed2cd1edd 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersReplaceMetadataCleanupSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersReplaceMetadataCleanupSpec.hs @@ -12,10 +12,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Services.PostgresDb 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.Test.SetupAction (permitTeardownFail) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRunSQLSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRunSQLSpec.hs index 8708410bd1f..c8dcb6bc064 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRunSQLSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersRunSQLSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Http qualified as Http import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (GlobalTestEnvironment, Server (..), TestEnvironment (options), getServer) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUniqueNameSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUniqueNameSpec.hs index 01d5815733c..b15466d145a 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUniqueNameSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUniqueNameSpec.hs @@ -10,9 +10,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook import Harness.Yaml (shouldBeYaml, shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUntrackTableCleanupSpec.hs b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUntrackTableCleanupSpec.hs index 6f90f633bc0..e0433ce3fc8 100644 --- a/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUntrackTableCleanupSpec.hs +++ b/server/lib/api-tests/src/Test/EventTriggers/PG/EventTriggersUntrackTableCleanupSpec.hs @@ -10,9 +10,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/HelloWorldSpec.hs b/server/lib/api-tests/src/Test/HelloWorldSpec.hs index e5625f25ca4..4f7f0bb416a 100644 --- a/server/lib/api-tests/src/Test/HelloWorldSpec.hs +++ b/server/lib/api-tests/src/Test/HelloWorldSpec.hs @@ -8,9 +8,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.DataConnector.Sqlite qualified as Sqlite import Harness.Backend.Postgres qualified as Postgres import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Services.GraphqlEngine (HgeServerInstance, emptyHgeConfig, withHge) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), testLogTrace) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Delete/AllSpec.hs b/server/lib/api-tests/src/Test/Mutations/Delete/AllSpec.hs index 5587de82d6b..c6e735b4c2a 100644 --- a/server/lib/api-tests/src/Test/Mutations/Delete/AllSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Delete/AllSpec.hs @@ -16,9 +16,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Delete/FieldSpec.hs b/server/lib/api-tests/src/Test/Mutations/Delete/FieldSpec.hs index 9627aed451a..71dd268cf69 100644 --- a/server/lib/api-tests/src/Test/Mutations/Delete/FieldSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Delete/FieldSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Delete/NestedFieldSpec.hs b/server/lib/api-tests/src/Test/Mutations/Delete/NestedFieldSpec.hs index 36ec4efd8bd..5ea26193581 100644 --- a/server/lib/api-tests/src/Test/Mutations/Delete/NestedFieldSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Delete/NestedFieldSpec.hs @@ -16,9 +16,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Delete/PrimaryKeySpec.hs b/server/lib/api-tests/src/Test/Mutations/Delete/PrimaryKeySpec.hs index f9d5398303f..c1b09604a3d 100644 --- a/server/lib/api-tests/src/Test/Mutations/Delete/PrimaryKeySpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Delete/PrimaryKeySpec.hs @@ -16,9 +16,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Insert/MultipleSpec.hs b/server/lib/api-tests/src/Test/Mutations/Insert/MultipleSpec.hs index 2c5ef95bad1..7ef9a730c6c 100644 --- a/server/lib/api-tests/src/Test/Mutations/Insert/MultipleSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Insert/MultipleSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Insert/SingleSpec.hs b/server/lib/api-tests/src/Test/Mutations/Insert/SingleSpec.hs index c4573c9ceeb..2918f07aa24 100644 --- a/server/lib/api-tests/src/Test/Mutations/Insert/SingleSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Insert/SingleSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/MultiplePerRequest/UpdateManySpec.hs b/server/lib/api-tests/src/Test/Mutations/MultiplePerRequest/UpdateManySpec.hs index 8e0c13588da..5025f936625 100644 --- a/server/lib/api-tests/src/Test/Mutations/MultiplePerRequest/UpdateManySpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/MultiplePerRequest/UpdateManySpec.hs @@ -13,9 +13,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Update/FieldSpec.hs b/server/lib/api-tests/src/Test/Mutations/Update/FieldSpec.hs index a29e441ff12..ce55f7cec8a 100644 --- a/server/lib/api-tests/src/Test/Mutations/Update/FieldSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Update/FieldSpec.hs @@ -16,9 +16,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Update/PrimaryKeySpec.hs b/server/lib/api-tests/src/Test/Mutations/Update/PrimaryKeySpec.hs index 386da75970d..4ae43c804a1 100644 --- a/server/lib/api-tests/src/Test/Mutations/Update/PrimaryKeySpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Update/PrimaryKeySpec.hs @@ -16,9 +16,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Mutations/Upsert/OnConflictSpec.hs b/server/lib/api-tests/src/Test/Mutations/Upsert/OnConflictSpec.hs index 350869535a3..0d02e1b55ab 100644 --- a/server/lib/api-tests/src/Test/Mutations/Upsert/OnConflictSpec.hs +++ b/server/lib/api-tests/src/Test/Mutations/Upsert/OnConflictSpec.hs @@ -13,9 +13,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/AggregationSpec.hs b/server/lib/api-tests/src/Test/Queries/AggregationSpec.hs index 87654a8c50e..39a58d2159e 100644 --- a/server/lib/api-tests/src/Test/Queries/AggregationSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/AggregationSpec.hs @@ -18,10 +18,10 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/DistinctSpec.hs b/server/lib/api-tests/src/Test/Queries/DistinctSpec.hs index 33a9b7daa56..bf12fbf2d2c 100644 --- a/server/lib/api-tests/src/Test/Queries/DistinctSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/DistinctSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Errors/InvalidQuerySpec.hs b/server/lib/api-tests/src/Test/Queries/Errors/InvalidQuerySpec.hs index 089f1a7b219..f23adf8201a 100644 --- a/server/lib/api-tests/src/Test/Queries/Errors/InvalidQuerySpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Errors/InvalidQuerySpec.hs @@ -19,9 +19,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Errors/MissingTableSpec.hs b/server/lib/api-tests/src/Test/Queries/Errors/MissingTableSpec.hs index 91c6ea298fe..e1a1192e4ee 100644 --- a/server/lib/api-tests/src/Test/Queries/Errors/MissingTableSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Errors/MissingTableSpec.hs @@ -19,9 +19,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Errors/NoQueriesAvailableSpec.hs b/server/lib/api-tests/src/Test/Queries/Errors/NoQueriesAvailableSpec.hs index a2b34409a17..f9b4a58d7e7 100644 --- a/server/lib/api-tests/src/Test/Queries/Errors/NoQueriesAvailableSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Errors/NoQueriesAvailableSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/FilterSearch/AggregationPredicatesSpec.hs b/server/lib/api-tests/src/Test/Queries/FilterSearch/AggregationPredicatesSpec.hs index ea7a5444f44..6932ef2fac0 100644 --- a/server/lib/api-tests/src/Test/Queries/FilterSearch/AggregationPredicatesSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/FilterSearch/AggregationPredicatesSpec.hs @@ -19,9 +19,9 @@ import Harness.GraphqlEngine (postGraphql, postGraphqlWithHeaders) import Harness.Permissions (Permission (SelectPermission), SelectPermissionDetails (..), selectPermission) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (setupPermissionsAction) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/Queries/FilterSearch/FilterSearchSpec.hs b/server/lib/api-tests/src/Test/Queries/FilterSearch/FilterSearchSpec.hs index 167c914b47e..53b642cfca8 100644 --- a/server/lib/api-tests/src/Test/Queries/FilterSearch/FilterSearchSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/FilterSearch/FilterSearchSpec.hs @@ -19,9 +19,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/LogicalModels/LogicalModelsQueriesSpec.hs b/server/lib/api-tests/src/Test/Queries/LogicalModels/LogicalModelsQueriesSpec.hs index ab9b08f13d6..1a8f2389238 100644 --- a/server/lib/api-tests/src/Test/Queries/LogicalModels/LogicalModelsQueriesSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/LogicalModels/LogicalModelsQueriesSpec.hs @@ -12,10 +12,10 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (shouldAtLeastBe, shouldBeYaml, shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/LogicalModels/SubscriptionsSpec.hs b/server/lib/api-tests/src/Test/Queries/LogicalModels/SubscriptionsSpec.hs index 961a3b5c6ec..643a20ffd20 100644 --- a/server/lib/api-tests/src/Test/Queries/LogicalModels/SubscriptionsSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/LogicalModels/SubscriptionsSpec.hs @@ -14,11 +14,11 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Subscriptions import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/NestedObjectSpec.hs b/server/lib/api-tests/src/Test/Queries/NestedObjectSpec.hs index 71626e593a6..a2bbb66079c 100644 --- a/server/lib/api-tests/src/Test/Queries/NestedObjectSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/NestedObjectSpec.hs @@ -18,9 +18,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Paginate/LimitSpec.hs b/server/lib/api-tests/src/Test/Queries/Paginate/LimitSpec.hs index da153a4192a..22a23af861d 100644 --- a/server/lib/api-tests/src/Test/Queries/Paginate/LimitSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Paginate/LimitSpec.hs @@ -19,9 +19,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Paginate/OffsetSpec.hs b/server/lib/api-tests/src/Test/Queries/Paginate/OffsetSpec.hs index 967a5c4f9a5..c8ac1937207 100644 --- a/server/lib/api-tests/src/Test/Queries/Paginate/OffsetSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Paginate/OffsetSpec.hs @@ -18,9 +18,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Simple/ObjectQueriesSpec.hs b/server/lib/api-tests/src/Test/Queries/Simple/ObjectQueriesSpec.hs index f3c0fc244d8..cab9c34255d 100644 --- a/server/lib/api-tests/src/Test/Queries/Simple/ObjectQueriesSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Simple/ObjectQueriesSpec.hs @@ -20,10 +20,10 @@ import Harness.GraphqlEngine (postGraphql) import Harness.Permissions (Permission (..), SelectPermissionDetails (..), selectPermission) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude 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 91ca25454ea..961485094c8 100644 --- a/server/lib/api-tests/src/Test/Queries/Simple/OperationNameSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Simple/OperationNameSpec.hs @@ -16,10 +16,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphqlYaml) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/Simple/PrimaryKeySpec.hs b/server/lib/api-tests/src/Test/Queries/Simple/PrimaryKeySpec.hs index 06934d9e3ec..09aa3c38039 100644 --- a/server/lib/api-tests/src/Test/Queries/Simple/PrimaryKeySpec.hs +++ b/server/lib/api-tests/src/Test/Queries/Simple/PrimaryKeySpec.hs @@ -17,10 +17,10 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/SortSpec.hs b/server/lib/api-tests/src/Test/Queries/SortSpec.hs index d7026f214b3..784b3ad44b3 100644 --- a/server/lib/api-tests/src/Test/Queries/SortSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/SortSpec.hs @@ -19,9 +19,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/AliasesSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/AliasesSpec.hs index b51899b0366..b8a69fe8b7e 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/AliasesSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/AliasesSpec.hs @@ -18,9 +18,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/DirectivesSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/DirectivesSpec.hs index 9ac7c242fe1..31b8c63afc5 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/DirectivesSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/DirectivesSpec.hs @@ -20,9 +20,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeAndSkipSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeAndSkipSpec.hs index 11933adfa42..f7255bd2621 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeAndSkipSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeAndSkipSpec.hs @@ -20,9 +20,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postGraphqlWithPair) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeSpec.hs index b0d7a3fce6b..7d45a944417 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/IncludeSpec.hs @@ -20,9 +20,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postGraphqlWithPair) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/SkipSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/SkipSpec.hs index ec28086b105..ead7333f0c4 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/SkipSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/Directives/SkipSpec.hs @@ -20,9 +20,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postGraphqlWithPair) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/FragmentsSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/FragmentsSpec.hs index c481fbf5f0f..91f987ec75f 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/FragmentsSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/FragmentsSpec.hs @@ -18,9 +18,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/VariablesSpec.hs b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/VariablesSpec.hs index f788e9a1ac8..7b1a68ab93f 100644 --- a/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/VariablesSpec.hs +++ b/server/lib/api-tests/src/Test/Queries/VariablesAliasesFragments/VariablesSpec.hs @@ -18,9 +18,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphqlWithPair) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/AggregateBoolExpConflictSpec.hs b/server/lib/api-tests/src/Test/Regression/AggregateBoolExpConflictSpec.hs index c9d8addd112..34b08629c35 100644 --- a/server/lib/api-tests/src/Test/Regression/AggregateBoolExpConflictSpec.hs +++ b/server/lib/api-tests/src/Test/Regression/AggregateBoolExpConflictSpec.hs @@ -3,9 +3,9 @@ module Test.Regression.AggregateBoolExpConflictSpec (spec) where import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment) import Hasura.Prelude import Test.Hspec (SpecWith, it) diff --git a/server/lib/api-tests/src/Test/Regression/ArrayLiteralTextEncodingSpec.hs b/server/lib/api-tests/src/Test/Regression/ArrayLiteralTextEncodingSpec.hs index 54afd0138bf..5724b8b386b 100644 --- a/server/lib/api-tests/src/Test/Regression/ArrayLiteralTextEncodingSpec.hs +++ b/server/lib/api-tests/src/Test/Regression/ArrayLiteralTextEncodingSpec.hs @@ -9,9 +9,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/DoNotTruncateSessionVariables8158Spec.hs b/server/lib/api-tests/src/Test/Regression/DoNotTruncateSessionVariables8158Spec.hs index 4446aea8b8b..2c77fbdcc3a 100644 --- a/server/lib/api-tests/src/Test/Regression/DoNotTruncateSessionVariables8158Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/DoNotTruncateSessionVariables8158Spec.hs @@ -10,9 +10,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/DropColumnWithPermissions8415Spec.hs b/server/lib/api-tests/src/Test/Regression/DropColumnWithPermissions8415Spec.hs index 52504bc7800..0ef4a31ab24 100644 --- a/server/lib/api-tests/src/Test/Regression/DropColumnWithPermissions8415Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/DropColumnWithPermissions8415Spec.hs @@ -9,8 +9,8 @@ import Harness.Constants qualified as Constants import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Permissions qualified as Permissions import Harness.Quoter.Yaml (yaml) +import Harness.Schema hiding (runSQL) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema hiding (runSQL) import Harness.Test.SetupAction (setupPermissionsAction) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/Regression/InsertOnConflict8260Spec.hs b/server/lib/api-tests/src/Test/Regression/InsertOnConflict8260Spec.hs index 0a4d0219b11..63af578e640 100644 --- a/server/lib/api-tests/src/Test/Regression/InsertOnConflict8260Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/InsertOnConflict8260Spec.hs @@ -14,9 +14,9 @@ import Harness.GraphqlEngine (postGraphqlWithHeaders) import Harness.Permissions (InsertPermissionDetails (..), Permission (..), SelectPermissionDetails (..), insertPermission, selectPermission) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture import Harness.Test.Introspection (introspectEnums, introspectTypes) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (setupPermissionsAction) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/Regression/LongIdentifiers3796Spec.hs b/server/lib/api-tests/src/Test/Regression/LongIdentifiers3796Spec.hs index 71f6eaccdc7..6bb26651067 100644 --- a/server/lib/api-tests/src/Test/Regression/LongIdentifiers3796Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/LongIdentifiers3796Spec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/MultiColumnObjectRelationshipsSpec.hs b/server/lib/api-tests/src/Test/Regression/MultiColumnObjectRelationshipsSpec.hs index 30a82b6d123..20b7221cb75 100644 --- a/server/lib/api-tests/src/Test/Regression/MultiColumnObjectRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/Regression/MultiColumnObjectRelationshipsSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/MultiplexQuerySpec.hs b/server/lib/api-tests/src/Test/Regression/MultiplexQuerySpec.hs index 3a3f8d0b2f1..6230b9968be 100644 --- a/server/lib/api-tests/src/Test/Regression/MultiplexQuerySpec.hs +++ b/server/lib/api-tests/src/Test/Regression/MultiplexQuerySpec.hs @@ -10,9 +10,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema qualified as Schema import Harness.Subscriptions import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/NullRemoteRelationship8345Spec.hs b/server/lib/api-tests/src/Test/Regression/NullRemoteRelationship8345Spec.hs index 276ff89b440..f510e148afd 100644 --- a/server/lib/api-tests/src/Test/Regression/NullRemoteRelationship8345Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/NullRemoteRelationship8345Spec.hs @@ -17,9 +17,9 @@ import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) import Harness.RemoteServer qualified as RemoteServer +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema 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 (GlobalTestEnvironment, Server, TestEnvironment (options), focusFixtureLeft, focusFixtureRight, stopServer) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/Regression/NullsOrderParsing8780Spec.hs b/server/lib/api-tests/src/Test/Regression/NullsOrderParsing8780Spec.hs index 94a628418bd..2273101dc8b 100644 --- a/server/lib/api-tests/src/Test/Regression/NullsOrderParsing8780Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/NullsOrderParsing8780Spec.hs @@ -8,8 +8,8 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/ObjectRelationshipsLimit7936Spec.hs b/server/lib/api-tests/src/Test/Regression/ObjectRelationshipsLimit7936Spec.hs index b51520a3fbb..61659761764 100644 --- a/server/lib/api-tests/src/Test/Regression/ObjectRelationshipsLimit7936Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/ObjectRelationshipsLimit7936Spec.hs @@ -12,9 +12,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql, postMetadata_) import Harness.Quoter.Graphql import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnOneOfYaml, shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/RemoteRelationshipStringifyNum8387Spec.hs b/server/lib/api-tests/src/Test/Regression/RemoteRelationshipStringifyNum8387Spec.hs index 0dbcaf8a91d..be040214f4c 100644 --- a/server/lib/api-tests/src/Test/Regression/RemoteRelationshipStringifyNum8387Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/RemoteRelationshipStringifyNum8387Spec.hs @@ -13,11 +13,11 @@ import Harness.Permissions (SelectPermissionDetails (..)) import Harness.Permissions qualified as Permissions import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..)) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture import Harness.Test.FixtureName (FixtureName (..)) -import Harness.Test.Schema (Table (..)) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction qualified as SetupAction import Harness.TestEnvironment (GlobalTestEnvironment, Server, TestEnvironment (..), getBackendTypeConfig, stopServer) import Harness.Yaml (shouldReturnYaml) diff --git a/server/lib/api-tests/src/Test/Regression/SqlServerIdentifierQuotingSpec.hs b/server/lib/api-tests/src/Test/Regression/SqlServerIdentifierQuotingSpec.hs index 1a991795692..80afdfbf4d9 100644 --- a/server/lib/api-tests/src/Test/Regression/SqlServerIdentifierQuotingSpec.hs +++ b/server/lib/api-tests/src/Test/Regression/SqlServerIdentifierQuotingSpec.hs @@ -7,8 +7,8 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Harness.Yaml import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Regression/StreamConflictSpec.hs b/server/lib/api-tests/src/Test/Regression/StreamConflictSpec.hs index a467e4ed609..e1b0050dddb 100644 --- a/server/lib/api-tests/src/Test/Regression/StreamConflictSpec.hs +++ b/server/lib/api-tests/src/Test/Regression/StreamConflictSpec.hs @@ -3,9 +3,9 @@ module Test.Regression.StreamConflictSpec (spec) where import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment) import Hasura.Prelude import Test.Hspec (SpecWith, it) diff --git a/server/lib/api-tests/src/Test/Regression/UsingTheSameFunctionForRootFieldAndComputedField8643Spec.hs b/server/lib/api-tests/src/Test/Regression/UsingTheSameFunctionForRootFieldAndComputedField8643Spec.hs index 8b20fd487e3..b2f69f7cd06 100644 --- a/server/lib/api-tests/src/Test/Regression/UsingTheSameFunctionForRootFieldAndComputedField8643Spec.hs +++ b/server/lib/api-tests/src/Test/Regression/UsingTheSameFunctionForRootFieldAndComputedField8643Spec.hs @@ -4,9 +4,9 @@ module Test.Regression.UsingTheSameFunctionForRootFieldAndComputedField8643Spec import Data.List.NonEmpty qualified as NE import Data.Text qualified as T import Harness.Backend.Postgres qualified as Postgres +import Harness.Schema +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction qualified as SetupAction import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/ScheduledEvents/ScheduledEventsInvalidEnvVarSpec.hs b/server/lib/api-tests/src/Test/ScheduledEvents/ScheduledEventsInvalidEnvVarSpec.hs index d3db6032ba1..3a01891078f 100644 --- a/server/lib/api-tests/src/Test/ScheduledEvents/ScheduledEventsInvalidEnvVarSpec.hs +++ b/server/lib/api-tests/src/Test/ScheduledEvents/ScheduledEventsInvalidEnvVarSpec.hs @@ -11,9 +11,9 @@ import Data.List.NonEmpty qualified as NE import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (SetupAction (..), permitTeardownFail) import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment) import Harness.Webhook qualified as Webhook diff --git a/server/lib/api-tests/src/Test/Schema/ComputedFields/ScalarSpec.hs b/server/lib/api-tests/src/Test/Schema/ComputedFields/ScalarSpec.hs index ea943c43f8c..0fc241b6431 100644 --- a/server/lib/api-tests/src/Test/Schema/ComputedFields/ScalarSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/ComputedFields/ScalarSpec.hs @@ -12,10 +12,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (SchemaName (..), Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (SchemaName (..), Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/ComputedFields/TableSpec.hs b/server/lib/api-tests/src/Test/Schema/ComputedFields/TableSpec.hs index bc3021c5eca..6dd7aaf8cae 100644 --- a/server/lib/api-tests/src/Test/Schema/ComputedFields/TableSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/ComputedFields/TableSpec.hs @@ -16,10 +16,10 @@ import Harness.Permissions (Permission (SelectPermission), SelectPermissionDetai import Harness.Permissions qualified as Permission import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (SchemaName (..), Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (SchemaName (..), Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/ConflictsSpec.hs b/server/lib/api-tests/src/Test/Schema/ConflictsSpec.hs index 6769f882fb7..fbd12605087 100644 --- a/server/lib/api-tests/src/Test/Schema/ConflictsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/ConflictsSpec.hs @@ -11,9 +11,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/CustomFieldNames/MutationSpec.hs b/server/lib/api-tests/src/Test/Schema/CustomFieldNames/MutationSpec.hs index b2efe7f8a28..538c6a1a881 100644 --- a/server/lib/api-tests/src/Test/Schema/CustomFieldNames/MutationSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/CustomFieldNames/MutationSpec.hs @@ -20,9 +20,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Test.Hspec (SpecWith, describe, it) diff --git a/server/lib/api-tests/src/Test/Schema/CustomFieldNames/QuerySpec.hs b/server/lib/api-tests/src/Test/Schema/CustomFieldNames/QuerySpec.hs index 65ef398de8f..d8322088e15 100644 --- a/server/lib/api-tests/src/Test/Schema/CustomFieldNames/QuerySpec.hs +++ b/server/lib/api-tests/src/Test/Schema/CustomFieldNames/QuerySpec.hs @@ -18,9 +18,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..), getBackendTypeConfig) import Harness.Yaml (shouldReturnYaml) import Test.Hspec (SpecWith, describe, it) diff --git a/server/lib/api-tests/src/Test/Schema/CustomFieldsSpec.hs b/server/lib/api-tests/src/Test/Schema/CustomFieldsSpec.hs index 319cc69bc76..b89f0e9ca43 100644 --- a/server/lib/api-tests/src/Test/Schema/CustomFieldsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/CustomFieldsSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/InsertSpec.hs b/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/InsertSpec.hs index 8cb648195b0..85df0abe3b2 100644 --- a/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/InsertSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/InsertSpec.hs @@ -17,9 +17,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/SelectSpec.hs b/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/SelectSpec.hs index 80d92280fee..40fae55fa34 100644 --- a/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/SelectSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/SelectSpec.hs @@ -16,9 +16,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/UpdateSpec.hs b/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/UpdateSpec.hs index e26bac8c7e0..c83d060ab10 100644 --- a/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/UpdateSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/DataValidations/Permissions/UpdateSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/DefaultValues/DefaultValuesSpec.hs b/server/lib/api-tests/src/Test/Schema/DefaultValues/DefaultValuesSpec.hs index cf887d749af..b789252accb 100644 --- a/server/lib/api-tests/src/Test/Schema/DefaultValues/DefaultValuesSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/DefaultValues/DefaultValuesSpec.hs @@ -15,9 +15,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql, postGraphqlWithHeaders, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/DefaultValues/OnConflictSpec.hs b/server/lib/api-tests/src/Test/Schema/DefaultValues/OnConflictSpec.hs index 65365b30b87..01101dd7cc6 100644 --- a/server/lib/api-tests/src/Test/Schema/DefaultValues/OnConflictSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/DefaultValues/OnConflictSpec.hs @@ -16,8 +16,8 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/EnumsSpec.hs b/server/lib/api-tests/src/Test/Schema/EnumsSpec.hs index 8cb674911ed..615dfee713f 100644 --- a/server/lib/api-tests/src/Test/Schema/EnumsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/EnumsSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/FromRemoteSchemaSpec.hs b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/FromRemoteSchemaSpec.hs index 48b83431bbd..fa2cd35924a 100644 --- a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/FromRemoteSchemaSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/FromRemoteSchemaSpec.hs @@ -18,10 +18,10 @@ import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) import Harness.RemoteServer qualified as RemoteServer +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture (Fixture (..), FixtureName (..)) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, Server, TestEnvironment (..), stopServer) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/MetadataAPI/Common.hs b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/MetadataAPI/Common.hs index 87b578a569f..1b8f3f94c0a 100644 --- a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/MetadataAPI/Common.hs +++ b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/MetadataAPI/Common.hs @@ -47,9 +47,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (yaml) import Harness.RemoteServer qualified as RemoteServer +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction qualified as SetupAction import Harness.Test.TestResource (Managed) import Harness.TestEnvironment (Server, TestEnvironment, focusFixtureLeft, focusFixtureRight, stopServer) diff --git a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBArrayRelationshipSpec.hs b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBArrayRelationshipSpec.hs index e3adf57ddba..72f23291aa4 100644 --- a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBArrayRelationshipSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBArrayRelationshipSpec.hs @@ -34,11 +34,11 @@ import Harness.Permissions qualified as Permissions import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml, yaml) import Harness.RemoteServer qualified as RemoteServer +import Harness.Schema (Table (..)) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture (LHSFixture, RHSFixture, SetupAction (..)) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..)) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction qualified as SetupAction import Harness.Test.TestResource (Managed) import Harness.TestEnvironment diff --git a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBObjectRelationshipSpec.hs b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBObjectRelationshipSpec.hs index 521e50ea5c9..9336e660e91 100644 --- a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBObjectRelationshipSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToDBObjectRelationshipSpec.hs @@ -30,9 +30,9 @@ import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) import Harness.Quoter.Yaml.InterpolateYaml (interpolateYaml) import Harness.RemoteServer qualified as RemoteServer +import Harness.Schema (Table (..)) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..)) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction as SetupAction import Harness.Test.TestResource (Managed) import Harness.TestEnvironment diff --git a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToRemoteSchemaRelationshipSpec.hs b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToRemoteSchemaRelationshipSpec.hs index 1dcceba5bdd..d5696b222d3 100644 --- a/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToRemoteSchemaRelationshipSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/RemoteRelationships/XToRemoteSchemaRelationshipSpec.hs @@ -28,9 +28,9 @@ import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) import Harness.RemoteServer qualified as RemoteServer +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (SetupAction (..)) import Harness.Test.SetupAction qualified as SetupAction import Harness.Test.TestResource (Managed) diff --git a/server/lib/api-tests/src/Test/Schema/TableRelationships/ArrayRelationshipsSpec.hs b/server/lib/api-tests/src/Test/Schema/TableRelationships/ArrayRelationshipsSpec.hs index 69eae77d496..c1035824a8e 100644 --- a/server/lib/api-tests/src/Test/Schema/TableRelationships/ArrayRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/TableRelationships/ArrayRelationshipsSpec.hs @@ -12,9 +12,9 @@ import Harness.Backend.Sqlserver qualified as Sqlserver import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaArrayRelationshipsSpec.hs b/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaArrayRelationshipsSpec.hs index 653a2c1ef98..3f8fbcd5202 100644 --- a/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaArrayRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaArrayRelationshipsSpec.hs @@ -9,9 +9,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaObjectRelationshipsSpec.hs b/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaObjectRelationshipsSpec.hs index 04568fd3836..c63bed4481b 100644 --- a/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaObjectRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/TableRelationships/CrossSchemaObjectRelationshipsSpec.hs @@ -14,10 +14,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType (BackendType (..)) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/TableRelationships/ObjectRelationshipsSpec.hs b/server/lib/api-tests/src/Test/Schema/TableRelationships/ObjectRelationshipsSpec.hs index c820d6d4521..654459b28ed 100644 --- a/server/lib/api-tests/src/Test/Schema/TableRelationships/ObjectRelationshipsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/TableRelationships/ObjectRelationshipsSpec.hs @@ -18,10 +18,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.BackendType (BackendType (..)) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Schema/ViewsSpec.hs b/server/lib/api-tests/src/Test/Schema/ViewsSpec.hs index 71dc0381f20..b789d0c0d60 100644 --- a/server/lib/api-tests/src/Test/Schema/ViewsSpec.hs +++ b/server/lib/api-tests/src/Test/Schema/ViewsSpec.hs @@ -10,9 +10,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (yaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Subscriptions/DerivedDataSpec.hs b/server/lib/api-tests/src/Test/Subscriptions/DerivedDataSpec.hs index 4a052ad1551..7d3b990c9ce 100644 --- a/server/lib/api-tests/src/Test/Subscriptions/DerivedDataSpec.hs +++ b/server/lib/api-tests/src/Test/Subscriptions/DerivedDataSpec.hs @@ -13,10 +13,10 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine (postGraphql, postMetadata_) import Harness.Quoter.Graphql (graphql) import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (Table (..), table) +import Harness.Schema qualified as Schema import Harness.Subscriptions (getNextResponse, withSubscriptions) import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (Table (..), table) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (options)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Subscriptions/RowUpdatesSpec.hs b/server/lib/api-tests/src/Test/Subscriptions/RowUpdatesSpec.hs index 4a8f6f5223f..9d8c4c061f2 100644 --- a/server/lib/api-tests/src/Test/Subscriptions/RowUpdatesSpec.hs +++ b/server/lib/api-tests/src/Test/Subscriptions/RowUpdatesSpec.hs @@ -14,9 +14,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Subscriptions import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/api-tests/src/Test/Subscriptions/StreamingSubscriptionsSpec.hs b/server/lib/api-tests/src/Test/Subscriptions/StreamingSubscriptionsSpec.hs index 9041abac224..e969232dae6 100644 --- a/server/lib/api-tests/src/Test/Subscriptions/StreamingSubscriptionsSpec.hs +++ b/server/lib/api-tests/src/Test/Subscriptions/StreamingSubscriptionsSpec.hs @@ -12,9 +12,9 @@ import Harness.Backend.Postgres qualified as Postgres import Harness.GraphqlEngine import Harness.Quoter.Graphql import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Subscriptions import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (GlobalTestEnvironment, TestEnvironment (..)) import Harness.Yaml (shouldReturnYaml) import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Backend/BigQuery.hs b/server/lib/test-harness/src/Harness/Backend/BigQuery.hs index b61bcc74a75..8a37135778e 100644 --- a/server/lib/test-harness/src/Harness/Backend/BigQuery.hs +++ b/server/lib/test-harness/src/Harness/Backend/BigQuery.hs @@ -34,17 +34,17 @@ import Harness.Env import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (yaml) -import Harness.Test.BackendType (BackendTypeConfig) -import Harness.Test.BackendType qualified as BackendType -import Harness.Test.Fixture (SetupAction (..)) -import Harness.Test.Schema +import Harness.Schema ( BackendScalarType (..), BackendScalarValue (..), ScalarValue (..), SchemaName (..), Table (..), ) -import Harness.Test.Schema qualified as Schema +import Harness.Schema qualified as Schema +import Harness.Test.BackendType (BackendTypeConfig) +import Harness.Test.BackendType qualified as BackendType +import Harness.Test.Fixture (SetupAction (..)) import Harness.TestEnvironment (TestEnvironment (..)) import Hasura.Backends.BigQuery.Connection (initConnection) import Hasura.Backends.BigQuery.Execute qualified as Execute diff --git a/server/lib/test-harness/src/Harness/Backend/Citus.hs b/server/lib/test-harness/src/Harness/Backend/Citus.hs index 29a4fe4d454..9dbdbad87d0 100644 --- a/server/lib/test-harness/src/Harness/Backend/Citus.hs +++ b/server/lib/test-harness/src/Harness/Backend/Citus.hs @@ -44,10 +44,10 @@ import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Logging import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (BackendScalarType (..), BackendScalarValue (..), ScalarValue (..), SchemaName (..)) +import Harness.Schema qualified as Schema import Harness.Test.BackendType (BackendTypeConfig) import Harness.Test.BackendType qualified as BackendType -import Harness.Test.Schema (BackendScalarType (..), BackendScalarValue (..), ScalarValue (..), SchemaName (..)) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (SetupAction (..)) import Harness.TestEnvironment (TestEnvironment (..)) import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Backend/Cockroach.hs b/server/lib/test-harness/src/Harness/Backend/Cockroach.hs index b4d8df6688b..63be92f1cfd 100644 --- a/server/lib/test-harness/src/Harness/Backend/Cockroach.hs +++ b/server/lib/test-harness/src/Harness/Backend/Cockroach.hs @@ -43,10 +43,10 @@ import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Logging import Harness.Quoter.Yaml (interpolateYaml) +import Harness.Schema (BackendScalarType (..), BackendScalarValue (..), ScalarValue (..), SchemaName (..)) +import Harness.Schema qualified as Schema import Harness.Test.BackendType (BackendTypeConfig) import Harness.Test.BackendType qualified as BackendType -import Harness.Test.Schema (BackendScalarType (..), BackendScalarValue (..), ScalarValue (..), SchemaName (..)) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (SetupAction (..)) import Harness.TestEnvironment (TestEnvironment (..)) import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Backend/DataConnector/Sqlite.hs b/server/lib/test-harness/src/Harness/Backend/DataConnector/Sqlite.hs index 8ed7dacac61..6fdd9f9bbb8 100644 --- a/server/lib/test-harness/src/Harness/Backend/DataConnector/Sqlite.hs +++ b/server/lib/test-harness/src/Harness/Backend/DataConnector/Sqlite.hs @@ -27,10 +27,10 @@ import Harness.DataConnectorAgent (createClone, createClone', deleteClone, delet import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (yaml) +import Harness.Schema (SchemaName) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType import Harness.Test.Fixture qualified as Fixture -import Harness.Test.Schema (SchemaName) -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (TestEnvironment (..)) import Hasura.Backends.DataConnector.API qualified as API import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Backend/Postgres.hs b/server/lib/test-harness/src/Harness/Backend/Postgres.hs index c30792cc246..f775c149624 100644 --- a/server/lib/test-harness/src/Harness/Backend/Postgres.hs +++ b/server/lib/test-harness/src/Harness/Backend/Postgres.hs @@ -56,16 +56,16 @@ import Harness.Constants as Constants import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml) -import Harness.Services.PostgresDb qualified as Postgres -import Harness.Test.BackendType (BackendTypeConfig) -import Harness.Test.BackendType qualified as BackendType -import Harness.Test.Schema +import Harness.Schema ( BackendScalarType (..), BackendScalarValue (..), ScalarValue (..), SchemaName (..), ) -import Harness.Test.Schema qualified as Schema +import Harness.Schema qualified as Schema +import Harness.Services.PostgresDb qualified as Postgres +import Harness.Test.BackendType (BackendTypeConfig) +import Harness.Test.BackendType qualified as BackendType import Harness.Test.SetupAction (SetupAction (..)) import Harness.TestEnvironment (GlobalTestEnvironment (..), TestEnvironment (..), TestingMode (..)) import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Backend/Sqlserver.hs b/server/lib/test-harness/src/Harness/Backend/Sqlserver.hs index 165e27a257a..295dc71ff83 100644 --- a/server/lib/test-harness/src/Harness/Backend/Sqlserver.hs +++ b/server/lib/test-harness/src/Harness/Backend/Sqlserver.hs @@ -35,9 +35,9 @@ import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Logging import Harness.Quoter.Yaml (yaml) +import Harness.Schema (BackendScalarType (..), BackendScalarValue (..), ScalarValue (..)) +import Harness.Schema qualified as Schema import Harness.Test.BackendType (BackendType (SQLServer), BackendTypeConfig (..)) -import Harness.Test.Schema (BackendScalarType (..), BackendScalarValue (..), ScalarValue (..)) -import Harness.Test.Schema qualified as Schema import Harness.Test.SetupAction (SetupAction (..)) import Harness.TestEnvironment (TestEnvironment (..)) import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Permissions/Metadata.hs b/server/lib/test-harness/src/Harness/Permissions/Metadata.hs index 0c17286bd45..ab3563de4a8 100644 --- a/server/lib/test-harness/src/Harness/Permissions/Metadata.hs +++ b/server/lib/test-harness/src/Harness/Permissions/Metadata.hs @@ -10,8 +10,8 @@ import Data.Aeson (Value) import Data.Text qualified as Text import Harness.Permissions.Types qualified as Types import Harness.Quoter.Yaml (yaml) +import Harness.Schema qualified as Schema import Harness.Test.BackendType qualified as BackendType -import Harness.Test.Schema qualified as Schema import Harness.TestEnvironment (TestEnvironment (..), getBackendTypeConfig) import Hasura.Prelude diff --git a/server/lib/test-harness/src/Harness/Test/Schema.hs b/server/lib/test-harness/src/Harness/Schema.hs similarity index 79% rename from server/lib/test-harness/src/Harness/Test/Schema.hs rename to server/lib/test-harness/src/Harness/Schema.hs index d0df9cd029a..0619a1a06a8 100644 --- a/server/lib/test-harness/src/Harness/Test/Schema.hs +++ b/server/lib/test-harness/src/Harness/Schema.hs @@ -1,17 +1,10 @@ {-# LANGUAGE QuasiQuotes #-} -- | Common interface for setup/teardown for all backends - schema and data -module Harness.Test.Schema - ( Table (..), - table, - Reference (..), - reference, - Column (..), - ScalarType (..), - defaultSerialType, +module Harness.Schema + ( ScalarType (..), ScalarValue (..), WKT (..), - formatTableQualifier, TableQualifier (..), Constraint (..), UniqueIndex (..), @@ -21,23 +14,11 @@ module Harness.Test.Schema ManualRelationship (..), SchemaName (..), LogicalModel (..), - logicalModel, LogicalModelColumn (..), - logicalModelColumn, trackLogicalModelCommand, untrackLogicalModelCommand, resolveTableSchema, resolveReferenceSchema, - quotedValue, - unquotedValue, - backendScalarValue, - column, - columnNull, - defaultBackendScalarType, - getBackendScalarType, - defaultBackendScalarValue, - formatBackendScalarValueType, - parseUTCTimeOrError, trackTable, untrackTable, mkTableField, @@ -55,6 +36,7 @@ module Harness.Test.Schema addSource, trackLogicalModel, untrackLogicalModel, + module Harness.Schema.Table, ) where @@ -62,160 +44,18 @@ import Data.Aeson (Value, (.=)) import Data.Aeson qualified as Aeson import Data.Aeson.Key qualified as K import Data.Aeson.Types qualified as Aeson -import Data.Time (defaultTimeLocale) -import Data.Time.Format (parseTimeOrError) import Data.Vector qualified as V import Harness.Exceptions import Harness.GraphqlEngine qualified as GraphqlEngine import Harness.Quoter.Yaml (interpolateYaml, yaml) +import Harness.Schema.Name +import Harness.Schema.Table import Harness.Test.BackendType (BackendTypeConfig) import Harness.Test.BackendType qualified as BackendType -import Harness.Test.ScalarType -import Harness.Test.SchemaName import Harness.TestEnvironment (TestEnvironment (..), getBackendTypeConfig) import Hasura.Prelude import Safe (lastMay) --- | Generic type to use to specify schema tables for all backends. --- Usually a list of these make up a "schema" to pass to the respective --- @Harness.Backend..{setup,teardown}@ functions --- --- NOTE: There is neither a type-level check to assert that the length of --- tableColumns matches the length of each row in tableData, nor that the --- tablePrimaryKey only contains names of columns already in tableColumns or --- that tableReferences are valid references to other Tables. Test author will --- need to be just a bit careful while constructing Tables. -data Table = Table - { tableName :: Text, - -- | Columns that are references (foreign keys) should be null-able - tableColumns :: [Column], - tablePrimaryKey :: [Text], - tableReferences :: [Reference], - tableManualRelationships :: [Reference], - tableData :: [[ScalarValue]], - tableConstraints :: [Constraint], - tableUniqueIndexes :: [UniqueIndex], - tableQualifiers :: [TableQualifier] - } - deriving (Show, Eq) - --- | Used to qualify a tracked table by schema (and additionally by GCP projectId, in the case --- of BigQuery) -newtype TableQualifier = TableQualifier Text - deriving (Show, Eq) - -formatTableQualifier :: TableQualifier -> Text -formatTableQualifier (TableQualifier t) = t - -data Constraint = UniqueConstraintColumns [Text] | CheckConstraintExpression Text - deriving (Show, Eq) - -data UniqueIndex = UniqueIndexColumns [Text] | UniqueIndexExpression Text - deriving (Show, Eq) - --- | Create a table from just a name. --- Use record updates to modify the result. -table :: Text -> Table -table tableName = - Table - { tableName = tableName, - tableColumns = [], - tablePrimaryKey = [], - tableReferences = [], - tableManualRelationships = [], - tableData = [], - tableConstraints = [], - tableUniqueIndexes = [], - tableQualifiers = [] - } - -data LogicalModelColumn = LogicalModelColumn - { logicalModelColumnName :: Text, - logicalModelColumnType :: ScalarType, - logicalModelColumnNullable :: Bool, - logicalModelColumnDescription :: Maybe Text - } - deriving (Show, Eq) - -logicalModelColumn :: Text -> ScalarType -> LogicalModelColumn -logicalModelColumn name colType = - LogicalModelColumn - { logicalModelColumnName = name, - logicalModelColumnType = colType, - logicalModelColumnNullable = False, - logicalModelColumnDescription = Nothing - } - -data LogicalModel = LogicalModel - { logicalModelName :: Text, - logicalModelColumns :: [LogicalModelColumn], - logicalModelQuery :: Text, - logicalModelArguments :: [LogicalModelColumn], - logicalModelReturnTypeDescription :: Maybe Text - } - deriving (Show, Eq) - -logicalModel :: Text -> Text -> LogicalModel -logicalModel logicalModelName query = - LogicalModel - { logicalModelName, - logicalModelColumns = mempty, - logicalModelQuery = query, - logicalModelArguments = mempty, - logicalModelReturnTypeDescription = Nothing - } - --- | Foreign keys for backends that support it. -data Reference = Reference - { referenceLocalColumn :: Text, - referenceTargetTable :: Text, - referenceTargetColumn :: Text, - referenceTargetQualifiers :: [Text] - } - deriving (Show, Eq) - -reference :: Text -> Text -> Text -> Reference -reference localColumn targetTable targetColumn = - Reference - { referenceLocalColumn = localColumn, - referenceTargetTable = targetTable, - referenceTargetColumn = targetColumn, - referenceTargetQualifiers = mempty - } - --- | Type representing manual relationship between tables. This is --- only used for BigQuery backend currently where additional --- relationships has to be manually specified. -data ManualRelationship = ManualRelationship - { relSourceTable :: Text, - relTargetTable :: Text, - relSourceColumn :: Text, - relTargetColumn :: Text - } - deriving (Show, Eq) - --- | Generic type to construct columns for all backends -data Column = Column - { columnName :: Text, - columnType :: ScalarType, - columnNullable :: Bool, - columnDefault :: Maybe Text, - columnGqlAlias :: Maybe Text - } - deriving (Show, Eq) - --- | Helper function to construct 'Column's with common defaults -column :: Text -> ScalarType -> Column -column name typ = Column name typ False Nothing Nothing - --- | Helper function to construct 'Column's that are null-able -columnNull :: Text -> ScalarType -> Column -columnNull name typ = (column name typ) {columnNullable = True} - --- | Helper to construct UTCTime using @%F %T@ format. For e.g. @YYYY-MM-DD HH:MM:SS@ -parseUTCTimeOrError :: String -> ScalarValue -parseUTCTimeOrError = VUTCTime . parseTimeOrError True defaultTimeLocale "%F %T" - -- | we assume we are using the default schema unless a table tells us -- otherwise -- when multiple qualifiers are passed, we assume the last one is the schema diff --git a/server/lib/test-harness/src/Harness/Test/SchemaName.hs b/server/lib/test-harness/src/Harness/Schema/Name.hs similarity index 97% rename from server/lib/test-harness/src/Harness/Test/SchemaName.hs rename to server/lib/test-harness/src/Harness/Schema/Name.hs index 953631dcaa0..547ce2fe42d 100644 --- a/server/lib/test-harness/src/Harness/Test/SchemaName.hs +++ b/server/lib/test-harness/src/Harness/Schema/Name.hs @@ -1,6 +1,6 @@ -- | This module defines `SchemaName`, for naming DB schemas/datasets used in -- tests -module Harness.Test.SchemaName (SchemaName (..), getSchemaName) where +module Harness.Schema.Name (SchemaName (..), getSchemaName) where import Data.Aeson (ToJSON (..)) import Data.String diff --git a/server/lib/test-harness/src/Harness/Schema/Table.hs b/server/lib/test-harness/src/Harness/Schema/Table.hs new file mode 100644 index 00000000000..61314c7fd7d --- /dev/null +++ b/server/lib/test-harness/src/Harness/Schema/Table.hs @@ -0,0 +1,180 @@ +-- | Common interface for setup/teardown for all backends - schema and data +module Harness.Schema.Table + ( Table (..), + table, + Reference (..), + reference, + Column (..), + ScalarType (..), + defaultSerialType, + ScalarValue (..), + WKT (..), + formatTableQualifier, + TableQualifier (..), + Constraint (..), + UniqueIndex (..), + BackendScalarType (..), + BackendScalarValue (..), + BackendScalarValueType (..), + ManualRelationship (..), + LogicalModel (..), + logicalModel, + LogicalModelColumn (..), + logicalModelColumn, + quotedValue, + unquotedValue, + backendScalarValue, + column, + columnNull, + defaultBackendScalarType, + getBackendScalarType, + defaultBackendScalarValue, + formatBackendScalarValueType, + parseUTCTimeOrError, + ) +where + +import Data.Time (defaultTimeLocale) +import Data.Time.Format (parseTimeOrError) +import Harness.Test.ScalarType +import Hasura.Prelude + +-- | Generic type to use to specify schema tables for all backends. +-- Usually a list of these make up a "schema" to pass to the respective +-- @Harness.Backend..{setup,teardown}@ functions +-- +-- NOTE: There is neither a type-level check to assert that the length of +-- tableColumns matches the length of each row in tableData, nor that the +-- tablePrimaryKey only contains names of columns already in tableColumns or +-- that tableReferences are valid references to other Tables. Test author will +-- need to be just a bit careful while constructing Tables. +data Table = Table + { tableName :: Text, + -- | Columns that are references (foreign keys) should be null-able + tableColumns :: [Column], + tablePrimaryKey :: [Text], + tableReferences :: [Reference], + tableManualRelationships :: [Reference], + tableData :: [[ScalarValue]], + tableConstraints :: [Constraint], + tableUniqueIndexes :: [UniqueIndex], + tableQualifiers :: [TableQualifier] + } + deriving (Show, Eq) + +-- | Used to qualify a tracked table by schema (and additionally by GCP projectId, in the case +-- of BigQuery) +newtype TableQualifier = TableQualifier Text + deriving (Show, Eq) + +formatTableQualifier :: TableQualifier -> Text +formatTableQualifier (TableQualifier t) = t + +data Constraint = UniqueConstraintColumns [Text] | CheckConstraintExpression Text + deriving (Show, Eq) + +data UniqueIndex = UniqueIndexColumns [Text] | UniqueIndexExpression Text + deriving (Show, Eq) + +-- | Create a table from just a name. +-- Use record updates to modify the result. +table :: Text -> Table +table tableName = + Table + { tableName = tableName, + tableColumns = [], + tablePrimaryKey = [], + tableReferences = [], + tableManualRelationships = [], + tableData = [], + tableConstraints = [], + tableUniqueIndexes = [], + tableQualifiers = [] + } + +data LogicalModelColumn = LogicalModelColumn + { logicalModelColumnName :: Text, + logicalModelColumnType :: ScalarType, + logicalModelColumnNullable :: Bool, + logicalModelColumnDescription :: Maybe Text + } + deriving (Show, Eq) + +logicalModelColumn :: Text -> ScalarType -> LogicalModelColumn +logicalModelColumn name colType = + LogicalModelColumn + { logicalModelColumnName = name, + logicalModelColumnType = colType, + logicalModelColumnNullable = False, + logicalModelColumnDescription = Nothing + } + +data LogicalModel = LogicalModel + { logicalModelName :: Text, + logicalModelColumns :: [LogicalModelColumn], + logicalModelQuery :: Text, + logicalModelArguments :: [LogicalModelColumn], + logicalModelReturnTypeDescription :: Maybe Text + } + deriving (Show, Eq) + +logicalModel :: Text -> Text -> LogicalModel +logicalModel logicalModelName query = + LogicalModel + { logicalModelName, + logicalModelColumns = mempty, + logicalModelQuery = query, + logicalModelArguments = mempty, + logicalModelReturnTypeDescription = Nothing + } + +-- | Foreign keys for backends that support it. +data Reference = Reference + { referenceLocalColumn :: Text, + referenceTargetTable :: Text, + referenceTargetColumn :: Text, + referenceTargetQualifiers :: [Text] + } + deriving (Show, Eq) + +reference :: Text -> Text -> Text -> Reference +reference localColumn targetTable targetColumn = + Reference + { referenceLocalColumn = localColumn, + referenceTargetTable = targetTable, + referenceTargetColumn = targetColumn, + referenceTargetQualifiers = mempty + } + +-- | Type representing manual relationship between tables. This is +-- only used for BigQuery backend currently where additional +-- relationships has to be manually specified. +data ManualRelationship = ManualRelationship + { relSourceTable :: Text, + relTargetTable :: Text, + relSourceColumn :: Text, + relTargetColumn :: Text + } + deriving (Show, Eq) + +-- | Generic type to construct columns for all backends +data Column = Column + { columnName :: Text, + columnType :: ScalarType, + columnNullable :: Bool, + columnDefault :: Maybe Text, + columnGqlAlias :: Maybe Text + } + deriving (Show, Eq) + +-- | Helper function to construct 'Column's with common defaults +column :: Text -> ScalarType -> Column +column name typ = Column name typ False Nothing Nothing + +-- | Helper function to construct 'Column's that are null-able +columnNull :: Text -> ScalarType -> Column +columnNull name typ = (column name typ) {columnNullable = True} + +-- | Helper to construct UTCTime using @%F %T@ format. For e.g. @YYYY-MM-DD HH:MM:SS@ +parseUTCTimeOrError :: String -> ScalarValue +parseUTCTimeOrError = VUTCTime . parseTimeOrError True defaultTimeLocale "%F %T" diff --git a/server/lib/test-harness/test-harness.cabal b/server/lib/test-harness/test-harness.cabal index 1714cb77e3b..0b3d330fe65 100644 --- a/server/lib/test-harness/test-harness.cabal +++ b/server/lib/test-harness/test-harness.cabal @@ -143,6 +143,9 @@ library Harness.Quoter.Yaml Harness.Quoter.Yaml.InterpolateYaml Harness.RemoteServer + Harness.Schema + Harness.Schema.Name + Harness.Schema.Table Harness.Services.Composed Harness.Services.GraphqlEngine Harness.Services.Metadata @@ -156,13 +159,11 @@ library Harness.Test.Introspection Harness.Test.Protocol Harness.Test.ScalarType - Harness.Test.Schema - Harness.Test.SchemaName Harness.Test.SetupAction Harness.Test.TestResource Harness.TestEnvironment - Harness.Webhook Harness.WebSockets + Harness.Webhook Harness.Yaml other-modules: