diff --git a/server/tests-hspec/Test/RemoteRelationship/XToDBArrayRelationshipSpec.hs b/server/tests-hspec/Test/RemoteRelationship/XToDBArrayRelationshipSpec.hs index 369e5262d5f..1385ef5a9b7 100644 --- a/server/tests-hspec/Test/RemoteRelationship/XToDBArrayRelationshipSpec.hs +++ b/server/tests-hspec/Test/RemoteRelationship/XToDBArrayRelationshipSpec.hs @@ -47,7 +47,7 @@ combine :: LHSContext -> RHSContext -> Context (Maybe Server) combine lhs (tableName, rhs) = Context { name = Context.Combine lhsName rhsName, - mkLocalState = lhsPostgresMkLocalState, + mkLocalState = lhsMkLocalState, setup = \(state, localState) -> do GraphqlEngine.clearMetadata state rhsSetup (state, ()) @@ -59,10 +59,19 @@ combine lhs (tableName, rhs) = Context.combineOptions lhsOptions rhsOptions } where - Context {name = lhsName, setup = lhsSetup, teardown = lhsTeardown, customOptions = lhsOptions} = - lhs tableName - Context {name = rhsName, setup = rhsSetup, teardown = rhsTeardown, customOptions = rhsOptions} = - rhs + Context + { name = lhsName, + mkLocalState = lhsMkLocalState, + setup = lhsSetup, + teardown = lhsTeardown, + customOptions = lhsOptions + } = lhs tableName + Context + { name = rhsName, + setup = rhsSetup, + teardown = rhsTeardown, + customOptions = rhsOptions + } = rhs -------------------------------------------------------------------------------- diff --git a/server/tests-hspec/Test/RemoteRelationship/XToDBObjectRelationshipSpec.hs b/server/tests-hspec/Test/RemoteRelationship/XToDBObjectRelationshipSpec.hs index f5ba5542bd6..28dcd0870ab 100644 --- a/server/tests-hspec/Test/RemoteRelationship/XToDBObjectRelationshipSpec.hs +++ b/server/tests-hspec/Test/RemoteRelationship/XToDBObjectRelationshipSpec.hs @@ -41,7 +41,7 @@ combine :: LHSContext -> RHSContext -> Context (Maybe Server) combine lhs (tableName, rhs) = Context { name = Context.Combine lhsName rhsName, - mkLocalState = lhsPostgresMkLocalState, + mkLocalState = lhsMkLocalState, setup = \(state, localState) -> do GraphqlEngine.clearMetadata state rhsSetup (state, ()) @@ -55,6 +55,7 @@ combine lhs (tableName, rhs) = where Context { name = lhsName, + mkLocalState = lhsMkLocalState, setup = lhsSetup, teardown = lhsTeardown, customOptions = lhsOptions diff --git a/server/tests-hspec/Test/RemoteRelationship/XToRemoteSchemaRelationshipSpec.hs b/server/tests-hspec/Test/RemoteRelationship/XToRemoteSchemaRelationshipSpec.hs index fc6cfc4d2a4..565e809886a 100644 --- a/server/tests-hspec/Test/RemoteRelationship/XToRemoteSchemaRelationshipSpec.hs +++ b/server/tests-hspec/Test/RemoteRelationship/XToRemoteSchemaRelationshipSpec.hs @@ -44,8 +44,8 @@ mkContext lhs = Context { name = lhsName, mkLocalState = \state -> do - rhsServer <- rhsPostgresMkLocalState state - lhsServer <- lhsPostgresMkLocalState state + rhsServer <- rhsRemoteServerMkLocalState state + lhsServer <- lhsMkLocalState state pure $ LocalTestState lhsServer rhsServer, setup = \(state, LocalTestState lhsServer rhsServer) -> do GraphqlEngine.clearMetadata state @@ -59,6 +59,7 @@ mkContext lhs = where Context { name = lhsName, + mkLocalState = lhsMkLocalState, setup = lhsSetup, teardown = lhsTeardown, customOptions = lhsOptions @@ -145,8 +146,8 @@ type Query { |] -rhsPostgresMkLocalState :: State -> IO Server -rhsPostgresMkLocalState _ = +rhsRemoteServerMkLocalState :: State -> IO Server +rhsRemoteServerMkLocalState _ = RemoteServer.run $ RemoteServer.generateQueryInterpreter (Query {album}) where